* Disable console redirection to a tty. */
| 590 | * Disable console redirection to a tty. |
| 591 | */ |
| 592 | void |
| 593 | constty_clear(void) |
| 594 | { |
| 595 | int c; |
| 596 | |
| 597 | constty = NULL; |
| 598 | if (consbuf == NULL) |
| 599 | return; |
| 600 | callout_stop(&conscallout); |
| 601 | while ((c = msgbuf_getchar(&consmsgbuf)) != -1) |
| 602 | cnputc(c); |
| 603 | free(consbuf, M_TTYCONS); |
| 604 | consbuf = NULL; |
| 605 | } |
| 606 | |
| 607 | /* Times per second to check for pending console tty messages. */ |
| 608 | static int constty_wakeups_per_second = 5; |
no test coverage detected