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>
cal: add const function attributes

Reference: http://lwn.net/Articles/285332/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
cal: prefer defined constant rather than magic values

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
libuuid: add extern qualifiers to system header

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include: simplify fputc_careful() in carefulputc.h

New version of comparisions does the same thing as the old version
without being quite as difficult to understand.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib: avoid use of obsolete getpass() function

Reference: http://man7.org/linux/man-pages/man3/getpass.3.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib: add function to remove string from memory

The memcpy(3) can be get optimized out by compiler.

Reference: https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Beware+of+compiler+optimizations
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
newgrp: use xgetpass() and memset_s() to group password validation

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