summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1996-11-09 18:55:45 +0000
committertholo <tholo@openbsd.org>1996-11-09 18:55:45 +0000
commit4e58cb70e3609ac2f15c178eafd887c4217d2e93 (patch)
treef6a7df79bad6f461bb73279d16d4df1ca2d61554
parentUse passed-in process, not curproc to determine if the process is in the (diff)
downloadwireguard-openbsd-4e58cb70e3609ac2f15c178eafd887c4217d2e93.tar.xz
wireguard-openbsd-4e58cb70e3609ac2f15c178eafd887c4217d2e93.zip
Implement CREAD
-rw-r--r--sys/kern/tty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index bca0d5eb398..611fae87200 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.17 1996/11/09 18:46:54 tholo Exp $ */
+/* $OpenBSD: tty.c,v 1.18 1996/11/09 18:55:45 tholo Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -233,6 +233,11 @@ ttyinput(c, tp)
add_tty_randomness(tp->t_dev, c);
/*
+ * If receiver is not enable, drop it.
+ */
+ if (!ISSET(tp->t_cflag, CREAD))
+ return (0);
+ /*
* If input is pending take it first.
*/
lflag = tp->t_lflag;