set optimize flags if possible */
| 619 | |
| 620 | /* set optimize flags if possible */ |
| 621 | void ttydisc_optimize(struct lwp_tty *tp) |
| 622 | { |
| 623 | tty_assert_locked(tp); |
| 624 | |
| 625 | if (ttyhook_hashook(tp, rint_bypass)) |
| 626 | { |
| 627 | tp->t_flags |= TF_BYPASS; |
| 628 | } |
| 629 | else if (ttyhook_hashook(tp, rint)) |
| 630 | { |
| 631 | tp->t_flags &= ~TF_BYPASS; |
| 632 | } |
| 633 | else if (!CMP_FLAG(i, ICRNL | IGNCR | IMAXBEL | INLCR | ISTRIP | IXON) && |
| 634 | (!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) && |
| 635 | (!CMP_FLAG(i, PARMRK) || |
| 636 | CMP_FLAG(i, IGNPAR | IGNBRK) == (IGNPAR | IGNBRK)) && |
| 637 | !CMP_FLAG(l, ECHO | ICANON | IEXTEN | ISIG | PENDIN)) |
| 638 | { |
| 639 | tp->t_flags |= TF_BYPASS; |
| 640 | } |
| 641 | else |
| 642 | { |
| 643 | tp->t_flags &= ~TF_BYPASS; |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | void ttydisc_modem(struct lwp_tty *tp, int open) |
| 648 | { |
no outgoing calls
no test coverage detected