| 2150 | } |
| 2151 | |
| 2152 | void |
| 2153 | ttyhook_unregister(struct tty *tp) |
| 2154 | { |
| 2155 | |
| 2156 | tty_assert_locked(tp); |
| 2157 | MPASS(tp->t_flags & TF_HOOK); |
| 2158 | |
| 2159 | /* Disconnect the hook. */ |
| 2160 | tp->t_flags &= ~TF_HOOK; |
| 2161 | tp->t_hook = NULL; |
| 2162 | |
| 2163 | /* Maybe we need to leave bypass mode. */ |
| 2164 | ttydisc_optimize(tp); |
| 2165 | |
| 2166 | /* Maybe deallocate the TTY as well. */ |
| 2167 | tty_rel_free(tp); |
| 2168 | } |
| 2169 | |
| 2170 | /* |
| 2171 | * /dev/console handling. |
no test coverage detected