diff options
author | bde <bde@FreeBSD.org> | 1995-07-21 16:30:59 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-07-21 16:30:59 +0000 |
commit | 7eb2bbeebf70c30bde58e58f1000e19b2accfa1e (patch) | |
tree | b96e0631cf5d83a843cd162eb32c6f2b8dbf0058 /sys/kern/tty.c | |
parent | 5d7eb9210cba744bb5f0d6952e8234ee6e958c2b (diff) | |
download | FreeBSD-src-7eb2bbeebf70c30bde58e58f1000e19b2accfa1e.zip FreeBSD-src-7eb2bbeebf70c30bde58e58f1000e19b2accfa1e.tar.gz |
Obtained from: partly from an ancient patch of mine via 1.1.5
Temporarily nuke TS_WOPEN. It was only used for the obscure MDMBUF
flow control option in the kernel and for informational purposes
in `pstat -t'. The latter worked properly only for ptys. In
general there may be multiple processes sleeping in open() and
multiple processes that successfully opened the tty by opening it
in O_NONBLOCK mode or during a window when CLOCAL was set. tty.c
doesn't have enough information to maintain the flag but always
cleared it in ttyopen().
TS_WOPEN should be restored someday just so that `pstat -t' can
display it (MDMBUF is already fixed). Fixing it requires counting
of processes sleeping in open() in too many serial drivers.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 5c14bc8..123c88c 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.50 1995/07/21 14:15:09 bde Exp $ + * $Id: tty.c,v 1.51 1995/07/21 14:41:43 bde Exp $ */ /*- @@ -204,7 +204,6 @@ ttyopen(device, tp) SET(tp->t_state, TS_ISOPEN); bzero(&tp->t_winsize, sizeof(tp->t_winsize)); } - CLR(tp->t_state, TS_WOPEN); /* * Initialize or restore a cblock allocation policy suitable for @@ -833,7 +832,6 @@ ttioctl(tp, cmd, data, flag) !ISSET(t->c_cflag, CLOCAL)) { #if 0 CLR(tp->t_state, TS_ISOPEN); - SET(tp->t_state, TS_WOPEN); #endif ttwakeup(tp); } @@ -1251,7 +1249,7 @@ ttymodem(tp, flag) int flag; { - if (!ISSET(tp->t_state, TS_WOPEN) && ISSET(tp->t_cflag, MDMBUF)) { + if (ISSET(tp->t_state, TS_CARR_ON) && ISSET(tp->t_cflag, MDMBUF)) { /* * MDMBUF: do flow control according to carrier flag */ |