fdisk: API: add label probing functionality

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>
mount: ext4 option inode_readahead should be inode_readahead_blks in mount.8

Mount option inode_readahead should be inode_readahead_blks. Also the
value should be a power of 2.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
docs: man page syntax fixes

Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
swapon: kill unused variables in show_table()

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
libblkid: cast blkid_loff_t to unsigned long long

Get rid of gcc warning and fix build with -Werror

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
utmpdump: kill unused variable in follow_by_inotify()

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
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).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
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).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
libblkid: remove duplicate entries in symbols

The commit a0487b1cb5beffb8f6783476664b01e8833e0ea8 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>
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]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
swapon: remove unused variables

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
utmpdump: remove unused variable

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
look: remove extra semicolon

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>
fdisk: make if clause easier to read

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
su: align with howto-usage-function

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
utmpdump: use help and version output macros

Done to reduce translation project work.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
translation: unify stat error messages

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
translation: unify file open error messages

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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