textual: fix some typos

Found with misspell-check version 2.0d.

Reference: https://github.com/lyda/misspell-check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cal: remove unnused structure and definition

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setterm: remove unnecessary variable

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lscpu: avoid use of bzero() in favor of memset()

The bzero() is marked as LEGACY in POSIX.1-2001.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cfdisk: add braces to ensure operation order

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdformat: match variable and print format types

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
mkfs.cramfs: use defined failure name rather than magic value

From manual page; 'On error, the value MAP_FAILED is returned, and errno
is set appropriately'.

Reference: http://man7.org/linux/man-pages/man2/mmap.2.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdisk: avoid code duplication

To me having call to close() twice is less readable than one new
variable.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
dmesg: avoid unnecessary variable assignment

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
setpriv: avoid alloca() use xmalloc() instead

The getgroups() can return up to NGROUPS_MAX supplementary groups, that
is (since kernel 2.6.3) 65536 in total.  The git_t is 4 bytes, so maximum
request is 256 kilobytes.  When a system happen to have memory preasure
alloca() may not be able to allocate enough memory, making debugging
unnecessarily difficult.  IMHO 64 pages is significant enough amount of
memory to be properly error checked at a time of allocation.

Reference: http://www.gnu.org/software/libc/manual/html_node/Disadvantages-of-Alloca.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
whereis: avoid printing uninitialized string

The patbuf[] needs to be filled before print out.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libfdisk: do not do the same thing twice in single if statement

The second argument was very likely meant to be 'be->offset'.
Maintainers review & sign-off will further verify this change being
correct.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libsmartcols: avoid variable dereference after release

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lscpu: avoid double free

The double free was possible for architectures other than x86_64 or i386.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libfdisk: make first sector buffer usage more robust

	$ ~/util-linux/fdisk -b 4096 xxx
	..
	Segmentation fault

The buffer has to be reinitialized always when we apply a new
device properties (e.g. sector size).

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
whereis: fix missing newline on empty results

Running "whereis foo.bar.quux" previously resulted in
printing the "foo.bar:" pattern prefix without any
newline following it.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
docs: fix many wording and some formatting issues in the man page of kill

Also, add the most-used form of '-signal' to the synopsis.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
build-sys: improve the informative message when not building some util

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
kill: use --queue option argument as sigval integer value

The sigqueue(3) takes two values, signal and sigval.  Contents of the
signal can be altered with --signal option argument, so the --queue
argument should be reserved to affect sigval_int.

This is regression fix introduced by commit
9e8dffd5cd29f03029b1ac99eecb129532ca5c0f.

Reference: http://man7.org/linux/man-pages/man3/sigqueue.3.html
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
uuidd.rc: drop on-demand mode from script

The on-demand mode was dropped from libuuid in
commit ea4f8845f0241c7 "libuuid: don't exec uuidd"

You now need systemd (socket activation) to use
uuidd on demand.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>