logger: allow use of --id=ppid when logging locally

There is no obvious way to make syslog(3) to print both pid or ppid, so
duplicate the libc syslog() to logger.  Making the ppid printing work
using unix socket has side effect of local becoming capable to use both
rfc format output, which is hopefully seen as good thing.  The
syslog_local() is format wise one-to-one copy with glibc syslog(3)
format.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
logger: remove openlog(3) options

One variable less, and more importantly bit operations become unnecessary
in if statements.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
logger: optimize string initializations

Setting whole array to be completely full of nulls cannot be as quick as
making the only significant member of the array when needed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
logger: set function arguments read-only when possible

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: mentintion default udp and tcp ports logger is using

The fact that 'syslog tcp/514' does not exist in RFS's, which has lead
to 'syslog-conn 601/tcp' be used in place could be a suprice and should
be told in manual.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: improve the description of --size in the man page of zramctl

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
docs: make the man-page licenses of chrt and taskset match their intent

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
textual: make the license of chrt and taskset slightly more explicit

This makes it match the license of the man pages.
While there, also tweak some other comment lines.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
docs: bring the chrt and taskset man pages closer to standard formatting

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
tests: fix fdisk/bsd for the two possible sectors/offsets

BSD disklabels depend on the endianess, but also on the architecture as
one can see in include/pt-bsd.h with the BSD_LABELSECTOR and
BSD_LABELOFFSET #define. This cause the testsuite to fail on the
affected architectures as the disk image is not the same as the expected
result.

Commit 180b3a7e tried to fix the endianess, but the special PowerPC case
has been chosen as a reference, so it still fails for example on MIPS BE
or S/390.

This patch fixes the testsuite by converting the md5sums to the expected
values, still depending on the endianess, but also for the two possible
sectors/offsets. This has been tested on Alpha, MIPS, PowerPC and x86-64,
so this should cover all 4 cases.

Cc: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
libfdisk: fix fdisk_get_optimal_iosize() and update tests

Signed-off-by: Karel Zak <kzak@redhat.com>
Merge remote-tracking branch 'sami/logger'
logger: use generic --id=<id>

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: apply travis clang PATH workaround

As seen in Travis build log the clang is not found, causing one of the
tests to fail.  This change adds a workaround from Travis issue 2607 to
util-linux.

Reference: https://travis-ci.org/karelzak/util-linux/jobs/33056101#L3630
Reference: https://github.com/travis-ci/travis-ci/issues/2607
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libmount: use -t for type.subtype in helpers API

References: https://github.com/karelzak/util-linux/issues/116
Signed-off-by: Karel Zak <kzak@redhat.com>
mountpoint: drop S_ISDIR check

Files can be mountpoints, too.
mountpoint: clarify that it works on files

fef4dfa174 removed the restriction that the argument must explicitly be
a directory, so let's fix up the documentation to reflect that.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: remove debug dump function, cleanup API

The fdisk_dump_* prefix will be used for sfdisk-like functionality.
The patch also add FDISK_ prefix to fdisk_get_unit() options.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: basic fdisk_dump_* functions

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: move string trim function to strutils.h

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