diff options
author | bde <bde@FreeBSD.org> | 1996-11-30 15:03:05 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-11-30 15:03:05 +0000 |
commit | b456a837431d11e8e18e95fac35dcdd5be585577 (patch) | |
tree | ed3a8b8dee88d24bb37ff5c91fc587bba91be777 /sys/dev/sio | |
parent | 7b61f45bf306d3176a907c01d1a0f419916469ac (diff) | |
download | FreeBSD-src-b456a837431d11e8e18e95fac35dcdd5be585577.zip FreeBSD-src-b456a837431d11e8e18e95fac35dcdd5be585577.tar.gz |
Throw away input if CREAD is not set. POSIX requires no characters to be
received in this case even if the hardware doesn't have a CREAD bit.
Found by: NIST-PCTS
Diffstat (limited to 'sys/dev/sio')
-rw-r--r-- | sys/dev/sio/sio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 72a4424..5cc1f6c 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.149 1996/11/13 18:31:51 bde Exp $ + * $Id: sio.c,v 1.150 1996/11/30 14:51:04 bde Exp $ */ #include "opt_comconsole.h" @@ -1758,7 +1758,8 @@ repeat: enable_intr(); (*linesw[tp->t_line].l_start)(tp); } - if (incc <= 0 || !(tp->t_state & TS_ISOPEN)) + if (incc <= 0 || !(tp->t_state & TS_ISOPEN) || + !(tp->t_cflag & CREAD)) continue; /* * Avoid the grotesquely inefficient lineswitch routine |