This set improves the clock check to consider the last frequency set by
ptp4l/phc2sys in order to detect cases where multiple processes are
trying to control the same clock due to a misconfiguration or bug.
The first two patches fix a recent bug in phc2sys and remove an old
workaround to enable th
Some ancient kernels had a bug in reading of the clock frequency, which
was worked around by commit da347d7a36f2 ("ptp4l: Set clock frequency on
start").
Drop this workaround and support for the old kernels to make
clockadj_get_freq() useful.
Signed-off-by: Miroslav Lichvar
---
clock.c | 7 --
Clocks specified by the -c option, or the default CLOCK_REALTIME, were
added before the default values (e.g. sanity_freq_limit) were set in the
private structure used by clock_add().
Rework the code to save the names of sink clocks from command line and
add them only after the configuration is com
Before setting the new frequency offset on a clock update, compare the
current frequency with the value saved from the previous update and
print a warning message if they are different.
This should detect misconfigurations where multiple processes are trying
to control the clock (e.g. another ptp4