* Redirect console output to a tty. */
| 571 | * Redirect console output to a tty. |
| 572 | */ |
| 573 | void |
| 574 | constty_set(struct tty *tp) |
| 575 | { |
| 576 | int size; |
| 577 | |
| 578 | KASSERT(tp != NULL, ("constty_set: NULL tp")); |
| 579 | if (consbuf == NULL) { |
| 580 | size = consmsgbuf_size; |
| 581 | consbuf = malloc(size, M_TTYCONS, M_WAITOK); |
| 582 | msgbuf_init(&consmsgbuf, consbuf, size); |
| 583 | callout_init(&conscallout, 0); |
| 584 | } |
| 585 | constty = tp; |
| 586 | constty_timeout(NULL); |
| 587 | } |
| 588 | |
| 589 | /* |
| 590 | * Disable console redirection to a tty. |
no test coverage detected