diff options
author | phk <phk@FreeBSD.org> | 2004-06-04 21:55:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-04 21:55:55 +0000 |
commit | 17b52df3d7ba0c2789f07e8d92f72a03d507f1af (patch) | |
tree | 1aba351b2574e6180f5f98824ce4d10b1ba035f7 /sys/dev/cy | |
parent | 06049d3eaf941ee534b340558daac059b6b18912 (diff) | |
download | FreeBSD-src-17b52df3d7ba0c2789f07e8d92f72a03d507f1af.zip FreeBSD-src-17b52df3d7ba0c2789f07e8d92f72a03d507f1af.tar.gz |
Centralize the line discipline optimization determination in a function
called ttyldoptim().
Use this function from all the relevant drivers.
I belive no drivers finger linesw[] directly anymore, paving the way for
locking and refcounting.
Diffstat (limited to 'sys/dev/cy')
-rw-r--r-- | sys/dev/cy/cy.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 58abf6a..9dc95b3 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -2585,21 +2585,7 @@ disc_optim(tp, t, com) u_char opt; #endif - /* - * XXX can skip a lot more cases if Smarts. Maybe - * (IGNCR | ISTRIP | IXON) in c_iflag. But perhaps we - * shouldn't skip if (TS_CNTTB | TS_LNCH) is set in t_state. - */ - if (!(t->c_iflag & (ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON)) - && (!(t->c_iflag & BRKINT) || (t->c_iflag & IGNBRK)) - && (!(t->c_iflag & PARMRK) - || (t->c_iflag & (IGNPAR | IGNBRK)) == (IGNPAR | IGNBRK)) - && !(t->c_lflag & (ECHO | ICANON | IEXTEN | ISIG | PENDIN)) - && linesw[tp->t_line].l_rint == ttyinput) - tp->t_state |= TS_CAN_BYPASS_L_RINT; - else - tp->t_state &= ~TS_CAN_BYPASS_L_RINT; - com->hotchar = linesw[tp->t_line].l_hotchar; + com->hotchar = ttyldoptim(tp); #ifndef SOFT_HOTCHAR opt = com->cor[2] & ~CD1400_COR3_SCD34; if (com->hotchar != 0) { |