MCPcopy Create free account
hub / github.com/F-Stack/f-stack / constty_set

Function constty_set

freebsd/kern/kern_cons.c:573–587  ·  view source on GitHub ↗

* Redirect console output to a tty. */

Source from the content-addressed store, hash-verified

571 * Redirect console output to a tty.
572 */
573void
574constty_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.

Callers 1

tty_generic_ioctlFunction · 0.85

Calls 4

mallocFunction · 0.85
msgbuf_initFunction · 0.85
constty_timeoutFunction · 0.85
callout_initFunction · 0.70

Tested by

no test coverage detected