diff options
author | bde <bde@FreeBSD.org> | 1995-07-29 13:40:13 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-07-29 13:40:13 +0000 |
commit | 14ed6d3cb408b96bbf946287814b3a0d8be13a42 (patch) | |
tree | 240af9291d5034b8a6fc1ffc02892d0c35a79f52 /sys/kern/tty.c | |
parent | 7d793609e88f56616024a50a7086c0f13fd3dade (diff) | |
download | FreeBSD-src-14ed6d3cb408b96bbf946287814b3a0d8be13a42.zip FreeBSD-src-14ed6d3cb408b96bbf946287814b3a0d8be13a42.tar.gz |
Obtained from: partly from ancient patches by ache and me via 1.1.5
Remove nullmodem().
It may be useful to have a null modem routine, but nullmodem()
wasn't one. nullmodem() was identical to ttymodem() except it
didn't implement MDMBUF (carrier) flow control, didn't do any
wakeups for off to on carrier transitions, and didn't flush the
i/o queues for on to off carrier transitions (flushing has the side
effect of waking up readers and writers) although it did generate
SIGHUPs. The wakeups must normally be done even if nullmodem() is
null in case something is sleeping waiting for a carrier transition.
In any case, the wakeups should be harmless. They may cause bogus
results for select(), but select() is already bogus for nonstandard
line disciplines.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index b063ef9..c59aaca 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.56 1995/07/22 01:30:31 bde Exp $ + * $Id: tty.c,v 1.57 1995/07/22 16:45:07 bde Exp $ */ /*- @@ -1299,29 +1299,6 @@ ttymodem(tp, flag) } /* - * Default modem control routine (for other line disciplines). - * Return argument flag, to turn off device on carrier drop. - */ -int -nullmodem(tp, flag) - register struct tty *tp; - int flag; -{ - - if (flag) - SET(tp->t_state, TS_CARR_ON); - else { - CLR(tp->t_state, TS_CARR_ON); - if (!ISSET(tp->t_cflag, CLOCAL)) { - if (tp->t_session && tp->t_session->s_leader) - psignal(tp->t_session->s_leader, SIGHUP); - return (0); - } - } - return (1); -} - -/* * Reinput pending characters after state switch * call at spltty(). */ |