findmnt: test for fstype/options/maj:min before source and target

This change allows to exclude for example NFS mountpoint:

  findmnt --fstab --target /mnt/foo --type nonfs

to stall on a stalled nfs mount.

Signed-off-by: Karel Zak <kzak@redhat.com>
renice: exit with non-zero value when arguments cause warnings

This commit also fixes potential error counter wrap, which theoretically
could make command to exit with a success when it internally failed just
correct amount of times.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sfdisk: use libc error printing function, and symbolic exit values

The commit removes all references to perror(), and replaces them with
either warn() or err().

References: http://marc.info/?l=util-linux-ng&m=137060043804592&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sfdisk: clean up usage() functions

Includes removal of unhide usage function, which was never implemented.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sfdisk: use program_invocation_short_name to determine program name

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: correct sfdisk --activate instructions

The activate can be enabled by renaming the command to 'activate'.  Quite
confusingly the option and command arguments are interchangeable, and
depending on which one is defined as --activate option argument the
command will behave different rather different ways.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sfdisk: replace my_warn() with warnx()

This change adds program name in front of error messages.  Often that
helps user to know which command sent message, when the command is
executed as part of script.

Unfortunately the prefixing can break scripts, as someone might have
wrote automation which expects output in the format it has always been.
In programmer terms, the change has an ABI change, which some may find
annoying.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
dmesg: convert time format bitfield to enum

Foremost this commit makes time printing formats explicit.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
dmesg: add --time-format option

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
dmesg: add iso-8601 time format

The ISO-8601 should be welcomed by anyone who tries to parse dmesg time
stamp, and compare them across servers.  Time format tries to imitate
coreutils 'date --iso-8601=ns' output, but instead of having nanoseconds
the dmesg is using microseconds.

Reference: http://www.cs.tut.fi/~jkorpela/iso8601.html
Addresses: http://xkcd.com/1179/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: add --time-format option and ISO-8601 format to manual

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
dmesg: regroup time related options close to each other

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sd-daemon: update files taken from systemd project

Update sd-damoen.[hc] files from systemd upstream, using commit
fa3868c6d317b88715c55422b898f9070afe6575 as the sync point.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
hexdump: remove unnecessary global variables

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sfdisk: clean up unhide code

Signed-off-by: Karel Zak <kzak@redhat.com>
dmesg: fix --human color initialization

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