Karel Zak [Mon, 16 Jul 2012 16:19:08 +0000 (18:19 +0200)]
Merge branch '2012wk28'
* 2012wk28:
translation: unify file open error messages
translation: unify stat error messages
utmpdump: use help and version output macros
su: align with howto-usage-function
fdisk: make if clause easier to read
look: remove extra semicolon
utmpdump: remove unused variable
swapon: remove unused variables
lib/loopdev: minor bug fix: add missing semicolon
lib/pager: minor compiler warning fixes
libblkid: remove duplicate entries in symbols
Sami Kerola [Sat, 14 Jul 2012 21:35:41 +0000 (23:35 +0200)]
lib/loopdev: minor bug fix: add missing semicolon
Missing semicolon made test_loop_info() to return function
loopcxt_enable_debug() return value, which happen to be void. I
suspect the loopcxt_enable_debug() was usually not executed, while it
should be.
Sami Kerola [Sat, 14 Jul 2012 21:16:28 +0000 (23:16 +0200)]
lib/pager: minor compiler warning fixes
Add missing function prototype, and declare structure before use of it.
lib/pager.c:162:6: warning: no previous prototype for function 'setup_pager' [-Wmissing-prototypes]
lib/pager.c:20:29: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct child_process' [-Wtentative-definition-incomplete-type]
/usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all' which is also named in version 'BLKID_2.15' in script
/usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all_new' which is also named in version 'BLKID_2.15' in script
copying selected object files to avoid basename conflicts...
Petr Uzel [Thu, 12 Jul 2012 09:47:19 +0000 (11:47 +0200)]
fdisk: rename label probing functions
Rename check_$foo_label() to $foo_probe_label():
1/ 'probe' is more appropriate verb than 'check' for these functions
2/ making label name first part of the funciton name is IMO more
friendly for tags completion (e.g. vim + cscope/ctags).
Petr Uzel [Thu, 12 Jul 2012 09:47:18 +0000 (11:47 +0200)]
fdisk: don't call update_units() in label probes if not necessary
update_units() is called in _probe_labels before the label probes are
started, so we don't need to call it again in probers, unless it messes
around with geometry, which currently only check_sun_label() does (so
keep the call to update_units() in this one).
This patch sets the initial layout for label specific operations. A
new fdisk_label structure is created that will hold all these ops,
like new, delete, write and probe, among others. For now only probing
is implemented. Once this design is established, a copy of the probed
label will be copied to the main context structure, where calling the
specific functions will save 'disklabel' checks. Debugging support is
added as well.
This patch passes regression tests and manually passes bsd, sun, dos
and sgi labels probes.
Reviewed-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Sami Kerola [Sun, 24 Jun 2012 20:43:48 +0000 (22:43 +0200)]
swapon: add --show option
The --show uses lib/tt.c, which allows user to specify columns he is
interested of, and avoids using hard coded field sizes which may be
problematic when system has large enough swap.
Sami Kerola [Sat, 23 Jun 2012 05:05:14 +0000 (07:05 +0200)]
build-sys: change --localstatedir to /run
Enable user to define where run state files are wrote. Default for
these files is /run. See reference for rationale why /var/run is no
longer the default.
Reference: http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html CC: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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>
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>
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.
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.
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.