kernel/kernel/kernel.c
// kernel messages are white w/ blue background.
kernel messages are white w/ blue background.
kernel messages are white w / blue background .
static void kputs(char *msg, enum kputs_priority priority) {
	tty *t = (tty *) stdout->out;
	uint8_t col = tty_getcolor(t);
	tty_puts(t, "k: ");
	uint8_t ncol;
	if (priority == KPUTS_WARN) {
		ncol = COLOR_WHITE | (COLOR_BROWN << 4);
	} else if (priority == KPUTS_ERR) {
		ncol = COLOR_WHITE | (COLOR_RED << 4);
	} else {
		ncol = COLOR_WHITE | (COLOR_BLUE << 4);
	}
	tty_setcolor(t, ncol);
	tty_puts(t, msg); tty_putc(t, '\n');
	tty_setcolor(t, col);
}
static void kputs ( char * msg , enum kputs_priority priority ) { tty * t = ( tty * ) stdout -> out ; uint8_t col = tty_getcolor ( t ) ; tty_puts ( t , " " ) ; uint8_t ncol ; if ( priority == KPUTS_WARN ) { ncol = COLOR_WHITE | ( COLOR_BROWN << 4 ) ; } else if ( priority == KPUTS_ERR ) { ncol = COLOR_WHITE | ( COLOR_RED << 4 ) ; } else { ncol = COLOR_WHITE | ( COLOR_BLUE << 4 ) ; } tty_setcolor ( t , ncol ) ; tty_puts ( t , msg ) ; tty_putc ( t , ' \n ' ) ; tty_setcolor ( t , col ) ; }
kernel messages are white w/ blue background.
kernel messages are white w / blue background .
// somewhat low level tty usage.