[LinuxPPS] ntp 'bugs'
Udo van den Heuvel
udovdh at xs4all.nl
Sat Jun 28 18:35:10 CEST 2008
Rodolfo Giometti wrote:
> /* First we check if current device is a PPS valid PPS one...
> */
> ret = ioctl(source, PPS_CHECK);
> if (ret == 0) {
> /* Got it! Since in LinuxPPS there are no differences
> * between a "PPS source" and a "PPS handle", we
> * simply return the same value.
> */
> *handle = source;
>
> return 0;
> }
>
> /* Before exiting an error we have to verify if we can
> * change the line discipline for the current device in
> * case it's a serial one.
> */
> ldisc = N_PPS;
> (void) ioctl(pp->io.fd, TIOCSETD, &ldisc);
>
> /* The we return error, so caller should try the alternate
> * device.
> */
> errno = EOPNOTSUPP;
> return -1;
> }
Hmm. I had to look at the code in refclock_nmea...
Does the ldisc change work on the pps device so that it effects the
`connected` serial line?
This because the first time_pps_create in refclock_nmea is on the pps
device. Only when that fails we do a time_pps_create on the serial line
itself as a fallback.
Please enlighten us on the flow of the change in time_pps_create and the
correlation with e.g. the code in refclock_nmea.
Thanks,
Udo
More information about the LinuxPPS
mailing list