> -----Original Message----- > From: FUSTE Emmanuel [mailto:emmanuel.fu...@thalesgroup.com] > Sent: Friday, September 14, 2018 8:57 AM > To: Richard Cochran <richardcoch...@gmail.com> > Cc: linuxptp-devel@lists.sourceforge.net > Subject: Re: [Linuxptp-devel] [PATCH] add report of PTP_SYS_OFFSET_PRECISE > support to phc_ctl > > Le 14/09/2018 à 06:37, Richard Cochran a écrit : > > On Thu, Aug 16, 2018 at 03:22:51PM +0000, FUSTE Emmanuel wrote: > >> diff --git a/phc_ctl.c b/phc_ctl.c > >> index 4a78a19..f6234da 100644 > >> --- a/phc_ctl.c > >> +++ b/phc_ctl.c > >> @@ -353,12 +353,14 @@ static int do_caps(clockid_t clkid, int cmdc, char > *cmdv[]) > >> " %d programable alarms\n" > >> " %d external time stamp channels\n" > >> " %d programmable periodic signals\n" > >> - " %s pulse per second support", > >> + " %s pulse per second support\n" > >> + " %s precise system-device cross timestamps support", > >> caps.max_adj, > >> caps.n_alarm, > >> caps.n_ext_ts, > >> caps.n_per_out, > >> - caps.pps ? "has" : "doesn't have"); > >> + caps.pps ? "has" : "doesn't have", > >> + caps.cross_timestamping ? "has" : "doesn't have"); > >> return 0; > >> } > > This will need a compile time check for PTP_SYS_OFFSET_PRECISE, otherwise > you get > > > > /home/richard/git/linuxptp/phc_ctl.c: In function 'do_caps': > > /home/richard/git/linuxptp/phc_ctl.c:350:2: error: 'struct ptp_clock_caps' > > has > no member named 'cross_timestamping' > > make: *** [phc_ctl.o] Error 1 > > make: *** Waiting for unfinished jobs.... > > richard@hoboy:~/git/linuxptp$ uname -a > > Linux hoboy 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) > x86_64 GNU/Linux > > > > Thanks, > > Richard > > > Something like that ? > > diff --git a/phc_ctl.c b/phc_ctl.c > index 4a78a19..fdaeb08 100644 > --- a/phc_ctl.c > +++ b/phc_ctl.c > @@ -353,12 +353,18 @@ static int do_caps(clockid_t clkid, int cmdc, char > *cmdv[]) > " %d programable alarms\n" > " %d external time stamp channels\n" > " %d programmable periodic signals\n" > - " %s pulse per second support", > + " %s pulse per second support\n" > + " %s precise system-device cross timestamps support", > caps.max_adj, > caps.n_alarm, > caps.n_ext_ts, > caps.n_per_out, > - caps.pps ? "has" : "doesn't have"); > + caps.pps ? "has" : "doesn't have", > +#ifdef PTP_SYS_OFFSET_PRECISE > + caps.cross_timestamping ? "has" : "doesn't have"); > +#else > + "unknown"); > +#endif
If PTP_SYS_OFFSET_PRECISE is undefined, I think we can just list it as "doesn't have", no? Regards, Jake > return 0; > } > > Emmanuel. > > _______________________________________________ > Linuxptp-devel mailing list > Linuxptp-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-devel _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel