| 1111 | } |
| 1112 | |
| 1113 | size_t |
| 1114 | ttydisc_rint_bypass(struct tty *tp, const void *buf, size_t len) |
| 1115 | { |
| 1116 | size_t ret; |
| 1117 | |
| 1118 | tty_assert_locked(tp); |
| 1119 | |
| 1120 | MPASS(tp->t_flags & TF_BYPASS); |
| 1121 | |
| 1122 | atomic_add_long(&tty_nin, len); |
| 1123 | |
| 1124 | if (ttyhook_hashook(tp, rint_bypass)) |
| 1125 | return ttyhook_rint_bypass(tp, buf, len); |
| 1126 | |
| 1127 | ret = ttyinq_write(&tp->t_inq, buf, len, 0); |
| 1128 | ttyinq_canonicalize(&tp->t_inq); |
| 1129 | if (ret < len) |
| 1130 | tty_hiwat_in_block(tp); |
| 1131 | |
| 1132 | return (ret); |
| 1133 | } |
| 1134 | |
| 1135 | void |
| 1136 | ttydisc_rint_done(struct tty *tp) |
no test coverage detected