On Thu, Jun 23, 2022 at 04:58:33PM +0200, Maciek Machnikowski wrote:
> > > @@ -1266,6 +1277,10 @@ int main(int argc, char *argv[])
> > >
> > > if (!dst_name) {
> > > dst_name = "CLOCK_REALTIME";
> > > + r = phc2sys_static_dst_configuration(&priv, dst_name);
> > > + if (r) {
> > > + goto end;
> > > + }
> > > }
> > > if (hardpps_configured(pps_fd) && strcmp(dst_name,
> > "CLOCK_REALTIME")) {
> > > fprintf(stderr,
> >
> > This check won't work if someone specifies -c /dev/ptp0 -c CLOCK_REALTIME.
> > There should be a variable counting dst clocks and maybe dst_name could be
> > renamed to last_dst_name to avoid confusion.
>
> This checks if no -c parameter was specified (for the automatic mode).
> In such a case, it synchronizes the CLOCK_REALTIME by default,
> and it'll still do that.
I meant the second condition, using hardpps_configured().
--
Miroslav Lichvar
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel