setterm: improve wording and formatting of the man page

The main changes are: showing the arguments of boolean options
as optional, improving the alphabetization, and restoring the
--half-bright option that went missing in 2011.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
setterm: improve formatting and wording of usage text

Mainly: showing that the word color is a placeholder by writing
<color>, showing some numbers as optional, and message levels
and colors as not optional.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
lslogins: improve wording and formatting of the man page

Some typos, spacing, line breaks, and missing optional arguments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
lslogins: improve the columns information

Some fixes for typos, whitespace and wordings.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
findmnt: slightly improve wording and formatting in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
findmnt: minimally improve wording of usage text

Also sort the options better and tweak whitespace.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
umount: slightly improve the man page

Remove some stray words from option arguments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
swapon: align --summary fields

This commit makes  partitions and files to have remaining three columns
aligned.  Below print out demonstrates earlier misalignment.

$ swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       4194300 0       3
/home/src/util-linux/newswap            file    496     0       -1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
swapon: mark --sumarry as deprecated

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add note about deallocations

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: don't use --geom-* prefix for CHS options

We already use --cylinders, --heads and --sectors for sfdisk, let's
make new fdisk option compatible.

Signed-off-by: Karel Zak <kzak@redhat.com>
rename: allow renaming in subdirectories

Earlier the rename(1) considered path as possible string to be renamed,
could lead to an issue with none existing destination.  See below for
demonstration of this issue.  After this change all directory elements
are ignored when the match finding happens.

$ cd $(mktemp -d)
$ mkdir aa ab
$ touch a{a,b}/aa
$ rename -v a x */aa
rename: aa/aa: rename to xa/aa failed: No such file or directory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests: add function to change directory reliable way

Without arguments bash cd will move to $HOME. Ensure also that when
directory is assumed to be changed the current directory and intented
destination are the same location.

Reference: http://www.spinics.net/lists/util-linux-ng/msg09509.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests: use ts_cd everywhere to change direcrory

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests: add rename(1) checks

Check basic file moves, symlink relinking, and both file moves and
symlinks when operations are have directory in destination path.

Reviewed-by: Ruediger Meier <sweet_f_a@gmx.de>
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
rename: continue despite something failed

Try to do all file operations even when one or some of them fail, and
use exit value to inform what happen.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
rename: use function pointer to select file or symlink operation

Add separate functions to different functionality, and add a function for
the stuff that is in common for both.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests: add rename(1) return value check

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