[LinuxPPS] LinuxPPS new functionalities

Udo van den Heuvel udovdh at xs4all.nl
Sun Feb 21 16:55:18 CET 2010


Hello,

Do we know *WHY* this patch works?
I got this question from the person that I sent the previous ldattach
patches to. The answer might help add the needed functionality.

tilman at imap.cc writes:

> Can you explain how c_iflag may influence N_PPS? Does N_PPS itself
> heed c_iflag, or does it resort to some function of N_TTY which is
> influenced by c_iflag? Or is this just unexplained magic?

If we have a good reason/explanation things can be fixed quickly.

Kind regards,
Udo

On 2010-02-18 19:37, William S. Brasher wrote:
> I am using ldattach which comes from util-linux-ng, and it is working well 
> for me.  I do patch ldattach so that ntpd will start reliably when I boot 
> the machine; otherwise I have to first start ntpd, kill it, start ldattach 
> and finally start ntpd.  The patch to ldattach I use is:
> 
> 
> --- util-linux-ng-2.17.org/sys-utils/ldattach.c 2009-12-01 03:31:53.000000000 -0600
> +++ util-linux-ng-2.17/sys-utils/ldattach.c     2010-01-09 16:09:51.000000000 -0600
> @@ -239,6 +239,10 @@
>         ts.c_cflag |= (PARENB|PARODD);
>         break;
>      }
> +
> +    if (ldisc == 18)
> +        ts.c_iflag |= (IGNBRK|ICRNL);
> +
>      ts.c_cflag |= CREAD;       /* just to be on the safe side */
>      if (tcsetattr(tty_fd, TCSAFLUSH, &ts) < 0)
>         err(EXIT_FAILURE, _("cannot set terminal attributes for %s"), dev);
> 
> 
> 




More information about the LinuxPPS mailing list