From: deraadt Date: Thu, 14 Dec 1995 04:14:50 +0000 (+0000) Subject: from netbsd: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3941f6c3fca083d56dbff6f793c1e7dddb19af02;p=openbsd 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. --- 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))