On Mon, Sep 17, 2018 at 08:14:04AM +0000, FUSTE Emmanuel wrote: > Running the command compiled without PTP_SYS_OFFSET_PRECISE support on a > kernel (and perhaps the hardware) with PTP_SYS_OFFSET_PRECISE will > return a definitively wrong answer.
Yeah, this isn't ideal. Saying "unknown" is also a bit weird. People will wonder, why can't you tell? How about this: /* from linux kernel v4.19-rc4 */ struct compat_caps { int max_adj; /* Maximum frequency adjustment in parts per billon. */ int n_alarm; /* Number of programmable alarms. */ int n_ext_ts; /* Number of external time stamp channels. */ int n_per_out; /* Number of programmable periodic signals. */ int pps; /* Whether the clock supports a PPS callback. */ int n_pins; /* Number of input/output pins. */ /* Whether the clock supports precise system-device cross timestamps */ int cross_timestamping; int rsv[13]; /* Reserved for future use. */ }; and then static int do_caps(clockid_t clkid, int cmdc, char *cmdv[]) { union { struct ptp_clock_caps caps; struct compat_caps compat; } u; ... // check u.compat.cross_timestamping } Hm? Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel