docs: add su(1) btmp logging

Signed-off-by: Karel Zak <kzak@redhat.com>
hwclock: add the --compare option to the man page

The compare option for hwclock was not listed in the man page.  This
adds a simple decription of it.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
docs: remove hwclock --compare from TODO

commit 83765871ef0d6c554c46027577648b77c7351a78 added the --compare
option to hwclock so it can be removed from the TODO.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
mount: add -c abbreviation for --no-canonicalize to man page

The --no-canonicalize option can also be set using -c.  The --help for
mount shows this option but the man page did not.  Add -c to the man
page.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
mount: add long options for -L and -U to man page

The -L and -U flags both have long options too (--label and --uuid).
The usage() function will show them but the man page didn't list them.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
lib/color: add module for work with terminal colors

[kzak@redhat.com: - split from dmesg patch
                  - add more colors]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
dmesg: Add a --color option to colorize error and panic messages

[kzak@redhat.com: - update man page
                  - colorize critical messages too]

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
lib/loopdev: improve debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/loopdev: check for /sys

The current loopdev code prefers /sys to get information about
loop devices. The old methods like scan /dev are fallback solution
only. Unfortunately, the code does not check if /sys is mounted.

Addresses: http://blog.flameeyes.eu/2012/10/sophistication-can-be-bad
Signed-off-by: Karel Zak <kzak@redhat.com>
include/env: add get_hostname_max() inline function

Using sysconf(_SC_HOST_NAME_MAX) does not work everywhere.  At such even
header values for hostname length should be preferred, and if nothing
else works guess the maxium being 64 bytes.

Based-on-code-by: Karel Zak <kzak@redhat.com>
CC: Mike Frysinger <vapier@gentoo.org>
References: http://www.spinics.net/lists/util-linux-ng/msg07050.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/env: unify indentation

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login: stop using MAXHOSTNAMELEN

Use the sysconf(_SC_HOST_NAME_MAX) to determine maximum length of a
hostname.

Reviewed-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
write: stop using MAXHOSTNAMELEN

Use the sysconf(_SC_HOST_NAME_MAX) to determine maximum length of a
hostname.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
agetty: stop using MAXHOSTNAMELEN

Use the sysconf(_SC_HOST_NAME_MAX) to determine maximum length of a
hostname.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: add line breaks to whereis.1

Fix to tools script checkmans.sh warning.

testing: /home/src/util-linux/misc-utils/whereis.1
:120: warning [p 1, 10.8i, div `an-div', 0.0i]: can't break line

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libmount: replace usleep with nanosleep

POSIX.1-2001 declares usleep is obsolete.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/all-io: replace usleep with nanosleep

POSIX.1-2001 declares usleep is obsolete.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
hwclock: replace usleep with nanosleep

POSIX.1-2001 declares usleep is obsolete.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
rtcwake: replace usleep with nanosleep

POSIX.1-2001 declares usleep is obsolete.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
agetty: replace usleep with nanosleep

POSIX.1-2001 declares usleep is obsolete.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>