diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 04:14:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 04:14:51 +0000 |
commit | 087b970c0f111232f3eb0d06ae878ed54e1e8570 (patch) | |
tree | 3fcb449bc013eaf91bc062359b4b0e137665928e /sys | |
parent | 879cdd5548e52770eff12c68e55254004c696d9e (diff) |
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')
-rw-r--r-- | sys/kern/tty_compat.c | 18 |
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)) |