Log an info message when the LEAP_61 or LEAP_59 flag changes in the accepted time properties.
Signed-off-by: Miroslav Lichvar <mlich...@redhat.com> --- clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clock.c b/clock.c index f3aa616..c681cbf 100644 --- a/clock.c +++ b/clock.c @@ -1912,6 +1912,11 @@ struct timePropertiesDS clock_time_properties(struct clock *c) void clock_update_time_properties(struct clock *c, struct timePropertiesDS tds) { + if ((tds.flags ^ c->tds.flags) & (LEAP_61 | LEAP_59)) { + pr_info("updating time properties to %s leap second", + tds.flags & (LEAP_61 | LEAP_59) ? + (tds.flags & LEAP_61 ? "insert" : "delete") : "no"); + } if ((tds.flags & UTC_OFF_VALID && tds.flags & TIME_TRACEABLE && tds.currentUtcOffset != c->utc_offset) || tds.currentUtcOffset > c->utc_offset) { -- 2.26.3 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel