docs: update deprecated file

The goal is to consolidate the very basic linux commands and minimize
dependence on another packages (e.g. shadow-utils). It seems better to
keep newgrp, vipw and vigr as non-deprecated for now. Maybe we will
found a way how to improve the code. We will see... :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: api: propagate partition deletion to users

The generic fdisk_delete_partition() function returns 0 when a partition
is correctly deleted, otherwise it's corresponding error (negative values).
This, however, does not include problems that can occur in actual label
specific contexts, so we need to propagate the corresponding return code,
back to the user visible api.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: api: improve some comments

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: fix segfault when printing gpt raw data

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk: gpt: use swap_efi_guid for new partitions

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
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>
tailf: 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/usleep: remove remaining references to usleep

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>
libmount, eject: replace index() and rindex() with strrch() or strrchr()

Both index() and rindex() are legacy functions which may be withdrawn in
a future.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/index.html
Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/rindex.html
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
logger: replace gethostbyname() with getaddrinfo()

The gethostbyname() is legacy function which may be withdrawn in a
future.

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