Date: Sat, 20 Sep 2008 19:29:54 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 150174 for review Message-ID: <200809201929.m8KJTstZ028998@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150174 Change 150174 by ed@ed_dull on 2008/09/20 19:29:28 Always go into bypass mode when we have a rint_bypass handler. Affected files ... .. //depot/projects/mpsafetty/sys/kern/tty.c#40 edit .. //depot/projects/mpsafetty/sys/kern/tty_ttydisc.c#23 edit Differences ... ==== //depot/projects/mpsafetty/sys/kern/tty.c#40 (text+ko) ==== @@ -1697,6 +1697,9 @@ *rtp = tp; error = 0; + /* Maybe we can switch into bypass mode now. */ + ttydisc_optimize(tp); + done3: tty_unlock(tp); done2: dev_relthread(dev); done1: fdrop(fp, td); @@ -1714,6 +1717,9 @@ tp->t_flags &= ~TF_HOOK; tp->t_hook = NULL; + /* Maybe we need to leave bypass mode. */ + ttydisc_optimize(tp); + /* Maybe deallocate the TTY as well. */ tty_rel_free(tp); } ==== //depot/projects/mpsafetty/sys/kern/tty_ttydisc.c#23 (text+ko) ==== @@ -562,11 +562,12 @@ { tty_lock_assert(tp, MA_OWNED); - if (!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) && + if ((!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) && (!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) && (!CMP_FLAG(i, PARMRK) || CMP_FLAG(i, IGNPAR|IGNBRK) == (IGNPAR|IGNBRK)) && - !CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) { + !CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) || + ttyhook_hashook(tp, rint_bypass)) { tp->t_flags |= TF_BYPASS; } else { tp->t_flags &= ~TF_BYPASS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809201929.m8KJTstZ028998>