> -----Original Message-----
> From: Miroslav Lichvar <mlich...@redhat.com>
> Subject: Re: [Linuxptp-devel] [PATCH] phc2sys: Allow multiple sink clocks
> 
> 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().

OK Now I see it - will fix and resubmit.

Regards
Maciek



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

Reply via email to