Skip to contentSkip to conversation

missing 'console_driver' with CONFIG_VT but no CONFIG_VT_CONSOLE

BUG 2.6.1 Jun Sun 1 participant 1 message Jan 21, 2004

lore
Share & tools
lore

Jun Sun

author
#0 lore raw

See drivers/char/vt.c.

'console_driver' is defined only when CONFIG_VT_CONSOLE is set. However it is used by vty_init() which is outside the scope of CONFIG_VT_CONSOLE.

I think the fix is to move console_driver definition outside CONFIG_VT_CONSOLE. See the attachment. Hopefully someone with more knowledge on this can validate that.

Jun

char/vt.c renamed from char/vt.c.orig +2 -2
diff -Nru drivers/char/vt.c.orig drivers/char/vt.c
@@ -2086,6 +2086,8 @@
 	schedule_console_callback();
 }
 
+struct tty_driver *console_driver;
+
 #ifdef CONFIG_VT_CONSOLE
 
 /*
@@ -2185,8 +2187,6 @@
 	clear_bit(0, &printing);
 }
 
-struct tty_driver *console_driver;
-
 static struct tty_driver *vt_console_device(struct console *c, int *index)
 {
 	*index = c->index ? c->index-1 : fg_console;