summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1995-12-14 04:14:50 +0000
committerderaadt <deraadt@openbsd.org>1995-12-14 04:14:50 +0000
commit3941f6c3fca083d56dbff6f793c1e7dddb19af02 (patch)
treec86988a4ea9d4307385c518eb9ac8bca2abd0bf3 /sys/kern
parentfrom netbsd; shmfork does not need to know about vfork (diff)
downloadwireguard-openbsd-3941f6c3fca083d56dbff6f793c1e7dddb19af02.tar.xz
wireguard-openbsd-3941f6c3fca083d56dbff6f793c1e7dddb19af02.zip
from netbsd:
When converting from termios to sgtty, if RAW is set, use the previous settings of LITOUT and PASS8, since these cannot be determined from the termios modes.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty_compat.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c
index 53d7c52c7b5..33f691989b7 100644
--- a/sys/kern/tty_compat.c
+++ b/sys/kern/tty_compat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: tty_compat.c,v 1.26 1995/10/10 01:27:00 mycroft Exp $ */
+/* $NetBSD: tty_compat.c,v 1.27 1995/12/07 00:53:29 mycroft Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -275,12 +275,6 @@ ttcompatgetflags(tp)
} else
SET(flags, ANYP);
}
- if (ISSET(cflag, CSIZE) == CS8) {
- if (!ISSET(iflag, ISTRIP))
- SET(flags, PASS8);
- if (!ISSET(oflag, OPOST))
- SET(flags, LITOUT);
- }
if (!ISSET(lflag, ICANON)) {
/* fudge */
@@ -290,6 +284,16 @@ ttcompatgetflags(tp)
else
SET(flags, RAW);
}
+
+ if (ISSET(flags, RAW))
+ SET(flags, ISSET(tp->t_flags, LITOUT|PASS8));
+ else if (ISSET(cflag, CSIZE) == CS8) {
+ if (!ISSET(oflag, OPOST))
+ SET(flags, LITOUT);
+ if (!ISSET(iflag, ISTRIP))
+ SET(flags, PASS8);
+ }
+
if (ISSET(cflag, MDMBUF))
SET(flags, MDMBUF);
if (!ISSET(cflag, HUPCL))