tty: add no_vga option

This is mainly for UEFI systems without a VGA-compatible video card.
This commit is contained in:
Jean-Baptiste Boric 2015-11-12 17:08:12 +01:00 committed by rlfnb
parent 433a611348
commit 1c25730c5c

View File

@ -1538,8 +1538,10 @@ static void tty_init()
register tty_t *tp; register tty_t *tp;
int s; int s;
long disable_vga;
system_hz = sys_hz(); system_hz = sys_hz();
env_parse("no_vga", "d", 0, &disable_vga, 0, 1);
/* Initialize the terminal lines. */ /* Initialize the terminal lines. */
memset(tty_table, '\0' , sizeof(tty_table)); memset(tty_table, '\0' , sizeof(tty_table));
@ -1555,7 +1557,7 @@ static void tty_init()
tp->tty_termios = termios_defaults; tp->tty_termios = termios_defaults;
tp->tty_icancel = tp->tty_ocancel = tp->tty_ioctl = tp->tty_close = tp->tty_icancel = tp->tty_ocancel = tp->tty_ioctl = tp->tty_close =
tp->tty_open = tty_devnop; tp->tty_open = tty_devnop;
if (tp < tty_addr(NR_CONS)) { if (tp < tty_addr(NR_CONS) && disable_vga != 1) {
scr_init(tp); scr_init(tp);
/* Initialize the keyboard driver. */ /* Initialize the keyboard driver. */