]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agoutmpdump: cleanup file descriptor usage
Karel Zak [Tue, 10 Jul 2012 09:23:35 +0000 (11:23 +0200)] 
utmpdump: cleanup file descriptor usage

 - don't support --follow for stdin at all
 - inotify based implementation closes the file, so don't close it in
   main() again

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: encourage users not to follow stdin
Sami Kerola [Sun, 8 Jul 2012 21:20:04 +0000 (23:20 +0200)] 
utmpdump: encourage users not to follow stdin

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoutmpdump: use inotify to when following file
Sami Kerola [Tue, 10 Jul 2012 08:59:58 +0000 (10:59 +0200)] 
utmpdump: use inotify to when following file

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agoutmpdump: fixes based on static analysis [cppcheck]
Sami Kerola [Sun, 8 Jul 2012 19:03:14 +0000 (21:03 +0200)] 
utmpdump: fixes based on static analysis [cppcheck]

[utmpdump.c:82]: (style) The function 'unspace' is never used
[utmpdump.c:131]: (style) The scope of the variable 't' can be reduced
[utmpdump.c:167]: (warning) scanf without field width limits can crash with huge input data

[kzak@redhat.com: - don't use scanf field width limits for integers]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofix buffer overrun in some calls to sscanf
Karel Zak [Mon, 9 Jul 2012 20:26:27 +0000 (22:26 +0200)] 
fix buffer overrun in some calls to sscanf

Reported-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: white space fix
Sami Kerola [Wed, 4 Jul 2012 20:33:15 +0000 (22:33 +0200)] 
utmpdump: white space fix

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agodocs: clean up utmpdump.1 manual
Sami Kerola [Tue, 3 Jul 2012 19:35:09 +0000 (21:35 +0200)] 
docs: clean up utmpdump.1 manual

Align with Documentation/howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Conflicts:

login-utils/utmpdump.1

13 years agolibblkid: cleanup _attribute__ usage
Karel Zak [Mon, 9 Jul 2012 15:26:15 +0000 (17:26 +0200)] 
libblkid: cleanup _attribute__ usage

13 years agoMerge branch 'master' of https://github.com/dankamongmen/util-linux
Karel Zak [Mon, 9 Jul 2012 15:17:59 +0000 (17:17 +0200)] 
Merge branch 'master' of https://github.com/dankamongmen/util-linux

13 years agodocs: mention the required mount options for journaled version 2 quota
Björn Jacke [Wed, 4 Jul 2012 20:00:08 +0000 (22:00 +0200)] 
docs: mention the required mount options for journaled version 2 quota

13 years agodocs: add quota mount option support description for ext2
Björn Jacke [Wed, 4 Jul 2012 12:49:43 +0000 (14:49 +0200)] 
docs: add quota mount option support description for ext2

13 years agoutmpdump: document optional filename argument
Bernhard Voelker [Tue, 3 Jul 2012 07:42:55 +0000 (09:42 +0200)] 
utmpdump: document optional filename argument

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
13 years agofindmnt: fix typo in manpage
Bernhard Voelker [Thu, 28 Jun 2012 14:24:56 +0000 (16:24 +0200)] 
findmnt: fix typo in manpage

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
13 years agobuild-sys: ensure BUILD_CFDISK is always defined
Dave Reisner [Sat, 30 Jun 2012 16:01:18 +0000 (12:01 -0400)] 
build-sys: ensure BUILD_CFDISK is always defined

This avoids an error when configuring without ncurses:

configure: error: conditional "BUILD_CFDISK" was never defined.
Usually this means the macro was only invoked conditionally.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agodocs: remove unused config/texinfo.tex
Karel Zak [Mon, 9 Jul 2012 15:03:19 +0000 (17:03 +0200)] 
docs: remove unused config/texinfo.tex

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: fix typos found by misspellings
Bernhard Voelker [Wed, 27 Jun 2012 13:23:05 +0000 (15:23 +0200)] 
docs: fix typos found by misspellings

The tool misspellings (https://github.com/lyda/misspell-check)
detected several typos. Command used:

  $ git ls-files | grep -v ^po/ | misspellings -f -

* Documentation/releases/v2.18-ReleaseNotes: Fix typo in news entry.
* NEWS: Likewise.
* config/texinfo.tex: Fix typo in comments.
* libmount/src/context.c: Fix typo in comment.
* libmount/src/fs.c: Likewise.
* login-utils/login.c: Likewise.
* login-utils.su.1: Fix typo in man page.
* sys-utils/chcpu.c: Fix typo in error message.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
13 years agobuild-sys: add -Wredundant-decls
Karel Zak [Mon, 9 Jul 2012 14:53:13 +0000 (16:53 +0200)] 
build-sys: add -Wredundant-decls

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: support separate libintl
Karel Zak [Mon, 9 Jul 2012 14:44:25 +0000 (16:44 +0200)] 
build-sys: support separate libintl

Addresses: https://github.com/karelzak/util-linux/pull/13
Reported-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: always use default $(LDADD)
Karel Zak [Mon, 9 Jul 2012 14:23:51 +0000 (16:23 +0200)] 
build-sys: always use default $(LDADD)

The global variable $(LDADD) is always used if program_LDADD is
not specified. Let's use $LDADD everywhere to avoid exceptions for
people who need to specify global $LDADD.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agouse proper printf format spec %lu
nick black [Sat, 7 Jul 2012 15:42:35 +0000 (11:42 -0400)] 
use proper printf format spec %lu

13 years agouse memcpy() to cope with possible misalignment
nick black [Sat, 7 Jul 2012 15:42:17 +0000 (11:42 -0400)] 
use memcpy() to cope with possible misalignment

13 years agoproperly check for ansi c99 vsnprint truncation
nick black [Sat, 7 Jul 2012 15:41:15 +0000 (11:41 -0400)] 
properly check for ansi c99 vsnprint truncation

13 years agouse GCC format __attribute__ on sprinf
nick black [Sat, 7 Jul 2012 15:40:45 +0000 (11:40 -0400)] 
use GCC format __attribute__ on sprinf

13 years agohwclock: don't set time for --systz
Karel Zak [Wed, 4 Jul 2012 11:40:01 +0000 (13:40 +0200)] 
hwclock: don't set time for --systz

Not sure why, but the current --systz uses non-NULL timeval for
settimeofday(). It means that build-in kernel warp clock mechanism is
not used and the system time is always modified.

The built-in kernel implementation allows to move the clock by
timezone only for very first settimeofday() call.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: use xalloc.h, minor coding style changes
Karel Zak [Fri, 29 Jun 2012 15:34:12 +0000 (17:34 +0200)] 
utmpdump: use xalloc.h, minor coding style changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: cleanup usage()
Karel Zak [Fri, 29 Jun 2012 15:27:40 +0000 (17:27 +0200)] 
utmpdump: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: add long options
Karel Zak [Fri, 29 Jun 2012 15:22:42 +0000 (17:22 +0200)] 
utmpdump: add long options

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: use err.h stuff
Karel Zak [Fri, 29 Jun 2012 15:09:51 +0000 (17:09 +0200)] 
utmpdump: use err.h stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: add NLS and closestream support
Karel Zak [Fri, 29 Jun 2012 14:59:32 +0000 (16:59 +0200)] 
utmpdump: add NLS and closestream support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: remove dead code
Karel Zak [Fri, 29 Jun 2012 14:56:04 +0000 (16:56 +0200)] 
utmpdump: remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: remove libc5 support
Karel Zak [Fri, 29 Jun 2012 14:52:30 +0000 (16:52 +0200)] 
utmpdump: remove libc5 support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: cleanup comments, funcs definition lines
Karel Zak [Fri, 29 Jun 2012 14:43:37 +0000 (16:43 +0200)] 
utmpdump: cleanup comments, funcs definition lines

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoutmpdump: new command, merge from sysvinit
Karel Zak [Fri, 29 Jun 2012 14:34:46 +0000 (16:34 +0200)] 
utmpdump: new command, merge from sysvinit

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add TID column
Karel Zak [Thu, 28 Jun 2012 13:42:06 +0000 (15:42 +0200)] 
findmnt: add TID column

just in case we read from more mountinfo files.

For example get mountpoint from the current namespace which is invisible
for initd (PID=1):

 # unsahre -m bash
 # mount /dev/sdb /mnt/test
 # echo $$
 30070

 # findmnt -n -o TARGET,TID,SOURCE --task 1 --task $$ | \
      sort -u --key=1,1 | awk ' ($2 != 1) { print $0 }'

 /mnt/test                  30070 /dev/sdb

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: save task ID for mountinfo tiles
Karel Zak [Thu, 28 Jun 2012 13:40:16 +0000 (15:40 +0200)] 
libmount: save task ID for mountinfo tiles

Add new function mnt_fs_get_tid() to get task ID for the given filesystem.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add --task <tid> option
Karel Zak [Thu, 28 Jun 2012 11:51:34 +0000 (13:51 +0200)] 
findmnt: add --task <tid> option

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: don't use tree-like output if more -F options specified
Karel Zak [Thu, 28 Jun 2012 11:20:31 +0000 (13:20 +0200)] 
findmnt: don't use tree-like output if more -F options specified

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add FSROOT column
Dave Reisner [Wed, 27 Jun 2012 13:47:20 +0000 (09:47 -0400)] 
findmnt: add FSROOT column

Provide this separately in an unambiguous format, mainly to avoid the
need for scripts to parse the source of a btrfs subvol or bind mount.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agoswapon: fix typo
Karel Zak [Wed, 27 Jun 2012 12:04:03 +0000 (14:04 +0200)] 
swapon: fix typo

Reported-by: Manan Tuli <mt_void@yahoo.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add note about non-recursive build-sys
Karel Zak [Wed, 27 Jun 2012 09:27:36 +0000 (11:27 +0200)] 
docs: add note about non-recursive build-sys

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add sd-daemon.h to Makemodule.am
Karel Zak [Tue, 26 Jun 2012 21:03:22 +0000 (23:03 +0200)] 
build-sys: add sd-daemon.h to Makemodule.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add pager.h to Makemodule.am
Karel Zak [Tue, 26 Jun 2012 18:57:45 +0000 (20:57 +0200)] 
build-sys: add pager.h to Makemodule.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: fix swaplabel
Karel Zak [Tue, 12 Jun 2012 11:14:06 +0000 (13:14 +0200)] 
build-sys: fix swaplabel

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: create static uuid_generate_*.3 files
Karel Zak [Wed, 6 Jun 2012 19:31:59 +0000 (21:31 +0200)] 
build-sys: create static uuid_generate_*.3 files

It seems more simple to create small three files with man page links
than generate the files on the fly.

Note that the libuuid/man directory is not in builddir by default so
you have to create proper directory and then create the man pages...
too complex task for this three tiny files.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: enable libmount and libblkid docs
Karel Zak [Tue, 26 Jun 2012 16:42:49 +0000 (18:42 +0200)] 
build-sys: enable libmount and libblkid docs

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup .gitignore files
Karel Zak [Wed, 6 Jun 2012 11:28:06 +0000 (13:28 +0200)] 
build-sys: cleanup .gitignore files

 - move all binaries to top-level .gitignore
 - remove unnecessary */.gitignore files

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert lib/ to libcommon.la
Karel Zak [Mon, 4 Jun 2012 08:36:37 +0000 (10:36 +0200)] 
build-sys: convert lib/ to libcommon.la

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove include-Makefile.am
Karel Zak [Tue, 26 Jun 2012 16:31:53 +0000 (18:31 +0200)] 
build-sys: remove include-Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: rename fdisk -> fdisks/, convert to module
Karel Zak [Fri, 1 Jun 2012 14:15:29 +0000 (16:15 +0200)] 
build-sys: rename fdisk -> fdisks/, convert to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert tests/ to module
Karel Zak [Fri, 1 Jun 2012 13:30:56 +0000 (15:30 +0200)] 
build-sys: convert tests/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move partx to disk-utils/
Karel Zak [Tue, 26 Jun 2012 16:24:16 +0000 (18:24 +0200)] 
build-sys: move partx to disk-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert disk-utils/ to module
Karel Zak [Tue, 26 Jun 2012 16:20:00 +0000 (18:20 +0200)] 
build-sys: convert disk-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move getopt to misc-utils/
Karel Zak [Tue, 26 Jun 2012 16:17:22 +0000 (18:17 +0200)] 
build-sys: move getopt to misc-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert misc-utils/ to module
Karel Zak [Tue, 26 Jun 2012 16:14:36 +0000 (18:14 +0200)] 
build-sys: convert misc-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: move hwclock to sys-utils/
Karel Zak [Thu, 31 May 2012 09:15:07 +0000 (11:15 +0200)] 
build-sys: move hwclock to sys-utils/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert sys-utils/ to module
Karel Zak [Tue, 26 Jun 2012 16:06:21 +0000 (18:06 +0200)] 
build-sys: convert sys-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotools: cleanup config-gen.d
Karel Zak [Thu, 31 May 2012 08:55:14 +0000 (10:55 +0200)] 
tools: cleanup config-gen.d

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: cleanup mount stuff in configure.am
Karel Zak [Thu, 31 May 2012 08:03:35 +0000 (10:03 +0200)] 
build-sys: cleanup mount stuff in configure.am

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: add UL_CONFLICTS_BUILD m4 macro
Karel Zak [Thu, 31 May 2012 08:02:52 +0000 (10:02 +0200)] 
build-sys: add UL_CONFLICTS_BUILD m4 macro

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: (old) remove hybrid libmount code
Karel Zak [Wed, 30 May 2012 15:36:44 +0000 (17:36 +0200)] 
mount: (old) remove hybrid libmount code

The hybrid version with old mount and new mtab management from
libmount is not more supported.

Only two versions are supported:

  1/ old mount in mount-deprecated/, --enable-deprecated-mount

  2/ new sys-utils/mount.c, enabled by default

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: default to new sys-utils/mount.c, add --enable-deprecated-mount
Karel Zak [Wed, 30 May 2012 15:29:01 +0000 (17:29 +0200)] 
build-sys: default to new sys-utils/mount.c, add --enable-deprecated-mount

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: (old) remove mtab lock test
Karel Zak [Wed, 30 May 2012 15:17:49 +0000 (17:17 +0200)] 
mount: (old) remove mtab lock test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert mount/ to module, rename to mount-deprecated/
Karel Zak [Wed, 30 May 2012 15:16:11 +0000 (17:16 +0200)] 
build-sys: convert mount/ to module, rename to mount-deprecated/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert login-utils/ to module
Karel Zak [Wed, 30 May 2012 14:10:11 +0000 (16:10 +0200)] 
build-sys: convert login-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert term-utils/ to module
Karel Zak [Tue, 26 Jun 2012 15:53:09 +0000 (17:53 +0200)] 
build-sys: convert term-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert text-utils/ to module
Karel Zak [Wed, 30 May 2012 13:02:33 +0000 (15:02 +0200)] 
build-sys: convert text-utils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert libmount/ to module
Karel Zak [Tue, 26 Jun 2012 15:49:37 +0000 (17:49 +0200)] 
build-sys: convert libmount/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert libblkid/ to module
Karel Zak [Tue, 26 Jun 2012 15:44:15 +0000 (17:44 +0200)] 
build-sys: convert libblkid/ to module

 - create module
 - remove unused libblkid/src/tst_types.c test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert libuuid/ to module
Karel Zak [Wed, 23 May 2012 07:37:38 +0000 (09:37 +0200)] 
build-sys: convert libuuid/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert schedutils/ to module
Karel Zak [Tue, 22 May 2012 13:57:23 +0000 (15:57 +0200)] 
build-sys: convert schedutils/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: define per-test -DTEST_PROGRAM in lib/
Karel Zak [Tue, 22 May 2012 13:56:29 +0000 (15:56 +0200)] 
build-sys: define per-test -DTEST_PROGRAM in lib/

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert lib/ to module
Karel Zak [Wed, 16 May 2012 22:54:26 +0000 (00:54 +0200)] 
build-sys: convert lib/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: convert include/ to module
Karel Zak [Wed, 16 May 2012 13:05:11 +0000 (15:05 +0200)] 
build-sys: convert include/ to module

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-system: enable automake subdir-objects
Karel Zak [Wed, 16 May 2012 13:02:27 +0000 (15:02 +0200)] 
build-system: enable automake subdir-objects

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: ignore .dirstamp file
Karel Zak [Wed, 16 May 2012 12:37:28 +0000 (14:37 +0200)] 
build-sys: ignore .dirstamp file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agowhereis: cleanup man page, add note about $PATH
Karel Zak [Tue, 26 Jun 2012 07:53:51 +0000 (09:53 +0200)] 
whereis: cleanup man page, add note about $PATH

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=835211
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotunelp: check fstat return code [coverity scan]
Karel Zak [Thu, 21 Jun 2012 11:11:08 +0000 (13:11 +0200)] 
tunelp: check fstat return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: check sysfs_read_u64 return code [coverity scan]
Karel Zak [Thu, 21 Jun 2012 11:08:18 +0000 (13:08 +0200)] 
lsblk: check sysfs_read_u64 return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoswaplabel: check blkid_probe_lookup_value() result [coverity scan]
Karel Zak [Thu, 21 Jun 2012 10:54:31 +0000 (12:54 +0200)] 
swaplabel: check blkid_probe_lookup_value() result [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoscript: remove unused code
Karel Zak [Thu, 21 Jun 2012 10:14:34 +0000 (12:14 +0200)] 
script: remove unused code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoagetty: more robust debug() macro, check ioctl result [coverity scan]
Karel Zak [Thu, 21 Jun 2012 10:03:27 +0000 (12:03 +0200)] 
agetty: more robust debug() macro, check ioctl result [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: check ioctl result [coverity scan]
Karel Zak [Thu, 21 Jun 2012 09:58:39 +0000 (11:58 +0200)] 
lsblk: check ioctl result [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add lscpu test for box with 64 CPUs
Karel Zak [Thu, 21 Jun 2012 09:35:45 +0000 (11:35 +0200)] 
tests: add lscpu test for box with 64 CPUs

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                64
On-line CPU(s) list:   0-63
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             4
Vendor ID:             GenuineIntel
...

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib/loopdev: use warn_unused_result forimportant functions
Karel Zak [Thu, 21 Jun 2012 08:40:43 +0000 (10:40 +0200)] 
lib/loopdev: use warn_unused_result forimportant functions

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib/sysfs: use warn_unused_result for sysfs_init()
Karel Zak [Thu, 21 Jun 2012 06:28:49 +0000 (08:28 +0200)] 
lib/sysfs: use warn_unused_result for sysfs_init()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib/mangle: fix a memory leak in the test case
Cong Wang [Wed, 20 Jun 2012 08:42:05 +0000 (16:42 +0800)] 
lib/mangle: fix a memory leak in the test case

Marek reported there is a memory leak in lib/mangle.c

  CC       mangle.o
mangle.c:160:9: warning: Memory is never released; potential leak of memory pointed to by 'ss'

This patch fixes it.

Reported-by: Marek Otahal <markotahal@gmail.com>
Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
13 years agolib/sysfs: check if cxt->dir_path is NULL in sysfs_readlink()
Cong Wang [Wed, 20 Jun 2012 08:32:00 +0000 (16:32 +0800)] 
lib/sysfs: check if cxt->dir_path is NULL in sysfs_readlink()

cxt->dir_path could be NULL, for example, when sysfs_init() fails,
check this before calling readlink()/readlink_at().

Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
13 years agofdisk: add some debug messages
Karel Zak [Thu, 21 Jun 2012 06:17:50 +0000 (08:17 +0200)] 
fdisk: add some debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: use memset() rather than bzero()
Karel Zak [Thu, 21 Jun 2012 06:09:45 +0000 (08:09 +0200)] 
fdisk: use memset() rather than bzero()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: API: add geometry
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:33 +0000 (18:10 +0200)] 
fdisk: API: add geometry

Add device geometry to the fdisk API. While it maintains traditional behaviour, the cylinders
are changed to sector_t instead of unsigned int in order to avoid dealing with truncated cylinders.
A new helper is added to compute the amount of cylinders based on the heads and sectors - if a user passed
-H or -S to the program, it must call this function to update the corresponding values.

This patch passes regression tests.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: mark dos compatibility/CHS options deprecated in manpage
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:28 +0000 (18:10 +0200)] 
fdisk: mark dos compatibility/CHS options deprecated in manpage

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: sun: remove unused function
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:26 +0000 (18:10 +0200)] 
fdisk: sun: remove unused function

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: sgi: remove unused function
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:22 +0000 (18:10 +0200)] 
fdisk: sgi: remove unused function

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: sgi: remove unused code
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:15 +0000 (18:10 +0200)] 
fdisk: sgi: remove unused code

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: tests: update oddinput test
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:11 +0000 (18:10 +0200)] 
fdisk: tests: update oddinput test

Adding mbr to the API breaks this test, specifically when reading the first 512 bytes
of the MBR, update the expected output for oddinput.toosmall. Also let the test create
and remove the test file instead of having it in the expected directory.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: API: add mbr
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:07 +0000 (18:10 +0200)] 
fdisk: API: add mbr

This patch adds to the fdisk API the relevant logic to buffers that have MBR. This also serves for
future GPT support for the protective MBR. All labels have been updated to have access to the cxt
structure for the corresponding buffer.

An important observation is that SGI no longer uses the standard qsort(3) function to sort partitions,
as it needs access to cxt. To address this, a heap sort implementation from the kernel was added to
the label code and adapted to fdisk.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: API: add topology debug
Davidlohr Bueso [Sun, 17 Jun 2012 16:10:04 +0000 (18:10 +0200)] 
fdisk: API: add topology debug

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agofdisk: extend comments for fdisk_new_context()
Davidlohr Bueso [Sun, 17 Jun 2012 16:09:59 +0000 (18:09 +0200)] 
fdisk: extend comments for fdisk_new_context()

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agolsblk: fix usage, improve exclude/include lists parsing
Karel Zak [Tue, 19 Jun 2012 15:41:35 +0000 (17:41 +0200)] 
lsblk: fix usage, improve exclude/include lists parsing

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve ifdef HAVE_LIBSELINUX stuff
Karel Zak [Tue, 19 Jun 2012 14:19:18 +0000 (16:19 +0200)] 
libmount: improve ifdef HAVE_LIBSELINUX stuff

Signed-off-by: Karel Zak <kzak@redhat.com>