swapon: improve man page notes about holes

Signed-off-by: Karel Zak <kzak@redhat.com>
include/debug: improve and cleanup

* use ul_debug_ prefix for all routines
* support <NAME>_DEBUG=all also for programs without debug mask names
  (so we can avoid 0xffff mask in man pages)
* add function to print debug help

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: clean up debug, add "help" debug mask

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: clean up debug, add help debug mask

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: clean up debug, add help debug mask

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: clean up debug, add help debug mask

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: update info about env debug variables

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: cleanup libmount debug test

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/loopdev: replace custom DBG() with include/debug.h

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/loopdev: remove test program

All is already covered by losetup and mount. The test program has
never been used in our regression tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
switch_root: improve statfs->f_type portability

__SWORD_TYPE is not available everywhere, for example it's not defined
by musl libc. It also seems that __SWORD_TYPE is not used for f_type
on some architectures (s390x).

Reported-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sfdisk: fix version typos in man page

Reported-by: JWP <elseifthen@gmx.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: fix and improve -l warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
swapoff: swapoff swap files by LABEL and UUID

 # swapon --show=NAME,UUID
 NAME                   UUID
 /dev/sda3              8d52fca3-bf48-41d6-b826-2315e518a305
 /home/fs-images/2g.img 6fa72b96-b802-441f-a31c-091d65c0212c

 # swapoff UUID=6fa72b96-b802-441f-a31c-091d65c0212c
 swapoff: cannot find the device for UUID=6fa72b96-b802-441f-a31c-091d65c0212c

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
tests: update fdisk tests

Signed-off-by: Karel Zak <kzak@redhat.com>
mkswap: remove system architecture specific max swap size checks

Since kernel version 2.3.4 (June 1999) all architectures has used
uint32_t as maximum number or pages in a swap device or file, there is no
longer need to support systems earlier than that.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkswap: remove unnecessary size check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkswap: use err() rather than perror() && exit()

The messsages in err() are verified from po/util-linux.pot to be already
part of translations.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkswap: add struct mkswap_control to remove global variables

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkswap: make remaining functions to take control structure as argument

The wipe_device() and new_prober().

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