setarch: clean up usage()

Requested-by: Karel Zak <kzak@redhat.com>
References: http://marc.info/?l=util-linux-ng&m=136516351523680&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
bash-completion: setarch: use correct list for architectures

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
bash-completion: swapon: add options and fix argument

The initial bash-completion missed swapon options -L and -U.  Use of
block device was proposed to be more appropriate than a path to a file.

Requested-by: Karel Zak <kzak@redhat.com>
References: http://marc.info/?l=util-linux-ng&m=136517310727426&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
various: fix variable and function declarations [smatch scan]

disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
various: fix shadow declarations [smatch scan]

libmount/src/tab.c:990:34: warning: symbol 'fs' shadows an earlier one
libmount/src/tab.c:970:26: originally declared here
misc-utils/findmnt.c:492:30: warning: symbol 'tmp' shadows an earlier one
misc-utils/findmnt.c:473:14: originally declared here
fdisks/fdiskdoslabel.c:211:36: warning: symbol 'pe' shadows an earlier one
fdisks/fdiskdoslabel.c:180:20: originally declared here
fdisks/fdiskdoslabel.c:639:34: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:578:16: originally declared here
fdisks/fdiskdoslabel.c:947:21: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here
fdisks/fdiskdoslabel.c:976:29: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here
fdisks/fdiskdoslabel.c:984:29: warning: symbol 'i' shadows an earlier one
fdisks/fdiskdoslabel.c:924:16: originally declared here

[kzak@redhat.com: - don't use local 'tmp' in findmnt.c]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount, col: remove redundant null checks [smatch scan]

libmount/src/context_umount.c:174 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
libmount/src/context_umount.c:179 mnt_context_find_umount_fs() info: redundant null check on loopdev calling free()
text-utils/col.c:406 flush_lines() info: redundant null check on l->l_line calling free()

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libblkid: number of functions should not be declared extern [smatch scan]

These functions are already marked extern in header file.

libblkid/src/dev.c:70:19: warning: function 'blkid_dev_devname' with external linkage has definition
libblkid/src/dev.c:128:26: warning: function 'blkid_dev_iterate_begin' with external linkage has definition
libblkid/src/dev.c:148:12: warning: function 'blkid_dev_set_search' with external linkage has definition
libblkid/src/dev.c:175:12: warning: function 'blkid_dev_next' with external linkage has definition
libblkid/src/dev.c:196:13: warning: function 'blkid_dev_iterate_end' with external linkage has definition
libblkid/src/tag.c:84:12: warning: function 'blkid_dev_has_tag' with external linkage has definition
libblkid/src/tag.c:282:26: warning: function 'blkid_tag_iterate_begin' with external linkage has definition
libblkid/src/tag.c:303:12: warning: function 'blkid_tag_next' with external linkage has definition
libblkid/src/tag.c:322:13: warning: function 'blkid_tag_iterate_end' with external linkage has definition
libblkid/src/tag.c:336:18: warning: function 'blkid_find_dev_with_tag' with external linkage has definition

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools: add checks to manual page test script

This change includes

- better way to detect manual page inclusion
- man -k header test, which uses lexgrog
- repeated word detection
- static declaration to known repeated words

Most of the  changes are based on man-page-day-1.sh, that is in use at
RedHat Quality Assurance, and wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: mount.8: make propagation flags adjustable [checkmans.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: col.1: fix manual page name section [checkmans.sh]

$ lexgrog text-utils/col.1
text-utils/col.1: parse failed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: remove repeated words [checkmans.sh]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tools: make checkmans.sh to find missing manuals

Finding missing manuals is loosely based on ideas in man-page-day-1.sh,
wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: add mkfs.cramfs manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: add fsck.cramfs manual page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libblkid: fix DBG()

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: support LIBBLKID_DEBUG= only

 ... the BLKID_DEBUG= is not more supported.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: export blkid_init_debug()

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