* 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
The both macro SKIP_PAST_NEWLINE and location where macro is used will
not need semicolon at the end of line.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The commit a0487b1cb5 added symbol
dublicates. The symbols should only be listed in BLKID_1.0 segment.
/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...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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).
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
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).
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
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>
... so revert previous patches with extra options for clang.
Sometimes is simple solution so obvious that it's invisible :-)
Signed-off-by: Karel Zak <kzak@redhat.com>
Let's close all tty file descriptors if called with --hangup option.
References: https://lkml.org/lkml/2012/6/5/145
Signed-off-by: Karel Zak <kzak@redhat.com>
The session setup TIOCSCTTY is optional, so tcsetpgrp() that depends
on controlling terminal should be optional too.
Reported-by: Hilko Bengen <bengen@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
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.
[kzak@redhat.com: - improve usage(), remove unused code]
Cc: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
- 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>
[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>