On some platforms, time_t has recently switched from "long" to "long
long" [1]. For these platforms it is necessary to use "%lld" as printf
format specifier because the ABI differs between "long" and "long long".
I found no way for creating something similar to PRId64 for time_t. No
idea how to determine whether it's "long" or "long long". So I cast
everything to "long long" instead.
[1] https://git.musl-libc.org/cgit/musl/commit/?id=38143339646a4ccce8afe298c34467767c899f51
Signed-off-by: Christian Eggers <ceggers@arri.de>
When running multiple instances of ptp4l or phc2sys, it's difficult to
tell which log message belongs to which instance. Add new options to
ptp4l and phc2sys which can specify a tag for all messages printed to
the standard output or system log, so messages from different instances
can have different tags.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
The printing facility is used by different programs, allow to set the
program name which prefixes the messages written to stdout.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
this patch updates the global set functions to allow the user to set the
proper value instead of only being allowed to enable (or disable) a particular
feature. The new patch allows the function to specify exactly what they want
the value to be.
This patch also clarifies what -q and -v do by removing mention of quiet mode
and verbose mode. It is easy for a user to confuse and assume that -q disables
-v when this is not true.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
When diagnosing a log file, it can be useful to know the relative time
between the log entries. In contrast, the PID is mostly useless, since
the program does not ever fork.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>