From Andrew Chernov (ache@astral.msk.su):
authorDavid Greenman <davidg@Root.COM>
Wed, 20 Oct 1993 09:03:44 +0000 (09:03 +0000)
committerDavid Greenman <davidg@Root.COM>
Wed, 20 Oct 1993 09:03:44 +0000 (09:03 +0000)
commit110963ec56458ebfe69628577acfd8a0efbacb65
treea4156cbe87f63bc384fe5e15edb3311b06d41542
parentd5311b9f31bc0c7a7abcae86261d06eb27b9cb05
From Andrew Chernov (ache@astral.msk.su):
(note that #1 was not committed -DLG)

Fixed bugs list:

1) TIOCFLUSH stuff not working in getty,
because modems is *too* slow, and
issue TIOCFLUSH in the middle of CONNECT string output.
Solution is simple: I add sleep(2) after open port to allow
modem write CONNECT string, then flush it completely.

2) getty is really trick login: all 'gettytab' stuff not working,
because of usage of set_ttydefaults(0) before login call.
I restore meaning of all 'gettytab' flags and remove completely
unneded ttydefaults.c.
Initial TIOCGETP needed to initialize kernel's termios stuff.
because getty use old BSD ioctls,

3) TIOCFLUSH arguments are incorrect: last argument are address,
not value.

4) "np" (No parity, 8-bit) flags present, but not working:
restored.

6) KILL character are printed when entered string are empty:
not printed now.

7) Many peoples prefer to use ^H/DEL, ^U, ^D while login in any case,
KILL/ERASE pre-setted defaults no matter at this place, fixed.

In <9307270711.AA02004@kralizec.zeta.org.au> Bruce Evans writes:

>Here are some additional fixes.

>1. PASS8 is an output parameter, sort of.  It controls whether the
>mode is cs7 parenb or cs8 -parenb.  So, in subr.c, check NP before
>returning, and in main.c, always do a TIOCLSET ioctl when doing a
>TIOCSETP ioctl.  Note that it is theoretically possible to have
>differerent parities for input and output.

>2. echoke and echoke were not being set for login (previously they
>were set in set_ttydefaults()).  Fixed in gettytab.  Other getty/
>gettytab defaults are OK.  Except :ap: should not be default :-).

>3. I documented what all combinations of gettytab parity flags do.

>4. The correctness of the setting setting of istrip took a long time
>to debug because codrv clears it on the first read.  Now this kludge
>in codrv is unnecessary (solution is using :np: instead of :ap:) in
>gettytab.

>Bruce

I additionally fix original Bruce's patch and here final result:
libexec/getty/Makefile
libexec/getty/gettytab.c
libexec/getty/main.c
libexec/getty/subr.c