FreeBSD/sys/kern/kern_cons.c
/*
 * Redirect console output to a tty.
 */
Redirect console output to a tty.
Redirect console output to a tty .
void
constty_set(struct tty *tp)
{
	int size;
	KASSERT(tp != NULL, ("constty_set: NULL tp"));
	if (consbuf == NULL) {
		size = consmsgbuf_size;
		consbuf = malloc(size, M_TTYCONS, M_WAITOK);
		msgbuf_init(&consmsgbuf, consbuf, size);
		callout_init(&conscallout, 0);
	}
	constty = tp;
	constty_timeout(NULL);
}
void constty_set ( struct tty * tp ) { int size ; KASSERT ( tp != NULL , ( " " ) ) ; if ( consbuf == NULL ) { size = consmsgbuf_size ; consbuf = malloc ( size , M_TTYCONS , M_WAITOK ) ; msgbuf_init ( & consmsgbuf , consbuf , size ) ; callout_init ( & conscallout , 0 ) ; } constty = tp ; constty_timeout ( NULL ) ; }
Redirect console output to a tty.
Redirect console output to a tty .