libmount: don't use umount optimization for -l or -f

The options -l (lazy) and -f (force) means that the mountpoint may be
unreadable (for example because NFS server is unreadable). So we
should not try to be smart in this case and we should try to minimize
number of situations when stat() or readlink() is used for the
mountpoint.

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

Address: https://bugzilla.redhat.com/show_bug.cgi?id=865961
Signed-off-by: Karel Zak <kzak@redhat.com>
docs: align blkdiscard.8 with how-to-man-page.txt

* Add spaces after dots (English spacing).
* Remove use of inline emphasis where possible.
* Use mail and url macros.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
swapon: check numeric user inputs

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
swapon: clarify swapon.8 priority option

Value -1 is valid argument for -p, even though it might not make much
sense as the -1 is in use when priority is not specified at all.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: check numeric user inputs

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
mkfs.minix: check numeric user inputs

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
column: add --output-separator option

The --output-separator option will allow user to define table column
separator.  This will allow for example to write back same delimeter as
which was used as input separator, for example

column -t -s : -o : /etc/passwd

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: fix column.1 groff syntax error

Quote backslash which user is expected to see.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: refactor argument handing

Add function parse_arguments(), which has the same code block that was in
over long, and too deeply intended, main().

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: use libc error printing facilities

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: add const qualifiers where suitable

Includes a fix also to one assignment warning (see below).

text-utils/pg.c:1477:24: warning: assignment discards 'const' qualifier \
from pointer target type [enabled by default]

[kzak@redhat.com: - use const char rather than xstrdup() for static /bin/sh string]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
ddate: remove from util-linux

See RedHat bug for reasons why the ddate is cleaned up.  The reference is
where to get the command in future.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
pg: add noreturn function attributes

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: use unistd.h STDOUT_FILENO

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: do not turn off warnigns artificially

Compiler warnings often mean something, fiddling with them is not good
practise.  Besides the 'proglem' removed macro tried to 'fix' does not
even occur when compiling with modern gcc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
pg: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: fix coding style

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: align void in functions with prototypes, and remove void casts

If there is void in argument list at function prototype it is reasonable
to expect to see it also where the function is wrote.  This change also
removes unnecessary return value void casting.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
more: remove few memory leaks

The remaining memory leaks are related to ncurses internals, or the one
open file descriptor when user users 'q' to exit.

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