tests: add partx regression tests

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
tests: partx tests cleanup

 * use ts_scsi_debug_init

 * use headers in output

 * use udevadm

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

[kzak@redhat.com: - don't wipe if failed to create a backup file
                  - use ts_scsi_debug_init in the regression tests]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
wipefs: clean up code

This is C, use int & bits for boolean stuff rather than army of
variables.

Signed-off-by: Karel Zak <kzak@redhat.com>
Fix various typos
bash-completion: add mount and umount

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
blkid, hwclock, ldattach: use program_invocation_short_name

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
utmpdump: add option to write to a file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setpriv: allow login and group name option arguments

For an average user names are easier to use than uid and gid numbers.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
hexdump: add long options to the command

Includes update to bash completion, and manual as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setsid: exit when control terminal cannot be set

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cfdisk: check writing to a file was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setpriv: check writing to a file was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
agetty: check writing to a file was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: check writing to a file was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libblkid: check writing to a file was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include: add close_fd() for noticing write errors before close()

Essentially this helper function is similar to close_stream(), but for
file descriptors.

When a file descriptors are close()'d status of write is often
overlooked.  The close_fd() will try to determine what happen to writes
with fsync() before closing the file descriptor.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdformat: check writing to a file descriptor was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
partx: check writing to a file descriptor was successful

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
resizepart: check writing to a file descriptor was successful

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