Current implementation of generic pps source relies on the UTC-TAI offset read
from system. Some OSes don't set that offset by default and return 0. In such
case ts2phc sets PHC time to UTC timescale without notifying user.

This patch series moves leapfile handling to lstab and reuses the logic that was
applied to nmea source also to the generic, when the value read from system is
incorrect.

v2: Fixes after Richard's review

Signed-off-by: Maciek Machnikowski <mac...@machnikowski.net>

Maciek Machnikowski (3):
  lstab: Add LSTAB_EXPIRED result
  lstab: move update_leapsecond_table function to lstab
  ts2phc: Fix generic pps source when tai offset is not set in OS

 lstab.c                     | 55 +++++++++++++++++++++++-
 lstab.h                     | 14 +++++++
 ts2phc_generic_pps_source.c | 83 +++++++++++++++++++++++++++++++++----
 ts2phc_nmea_pps_source.c    | 58 ++++----------------------
 4 files changed, 152 insertions(+), 58 deletions(-)

-- 
2.34.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to