summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/2.6.22/20002_add-console-use-vt.patch1')
-rw-r--r--trunk/2.6.22/20002_add-console-use-vt.patch158
1 files changed, 58 insertions, 0 deletions
diff --git a/trunk/2.6.22/20002_add-console-use-vt.patch1 b/trunk/2.6.22/20002_add-console-use-vt.patch1
new file mode 100644
index 0000000..a63a027
--- /dev/null
+++ b/trunk/2.6.22/20002_add-console-use-vt.patch1
@@ -0,0 +1,58 @@
+Subject: add console_use_vt
+From: kraxel@suse.de
+Patch-mainline: no
+
+$subject says all
+
+---
+ drivers/char/tty_io.c | 7 ++++++-
+ include/linux/console.h | 1 +
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/char/tty_io.c 2007-08-27 14:01:21.000000000 -0400
++++ b/drivers/char/tty_io.c 2007-08-27 14:01:24.000000000 -0400
+@@ -133,6 +133,8 @@ LIST_HEAD(tty_drivers); /* linked list
+ DEFINE_MUTEX(tty_mutex);
+ EXPORT_SYMBOL(tty_mutex);
+
++int console_use_vt = 1;
++
+ #ifdef CONFIG_UNIX98_PTYS
+ extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
+ extern int pty_limit; /* Config limit on Unix98 ptys */
+@@ -2581,7 +2583,7 @@ retry_open:
+ goto got_driver;
+ }
+ #ifdef CONFIG_VT
+- if (device == MKDEV(TTY_MAJOR,0)) {
++ if (console_use_vt && device == MKDEV(TTY_MAJOR,0)) {
+ extern struct tty_driver *console_driver;
+ driver = console_driver;
+ index = fg_console;
+@@ -4048,6 +4050,8 @@ static int __init tty_init(void)
+ #endif
+
+ #ifdef CONFIG_VT
++ if (!console_use_vt)
++ goto out_vt;
+ cdev_init(&vc0_cdev, &console_fops);
+ if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
+ register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
+@@ -4055,6 +4059,7 @@ static int __init tty_init(void)
+ device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0");
+
+ vty_init();
++ out_vt:
+ #endif
+ return 0;
+ }
+--- a/include/linux/console.h 2007-08-27 14:01:24.000000000 -0400
++++ b/include/linux/console.h 2007-08-27 14:01:24.000000000 -0400
+@@ -63,6 +63,7 @@ extern const struct consw dummy_con; /*
+ extern const struct consw vga_con; /* VGA text console */
+ extern const struct consw newport_con; /* SGI Newport console */
+ extern const struct consw prom_con; /* SPARC PROM console */
++extern int console_use_vt;
+
+ int con_is_bound(const struct consw *csw);
+ int register_con_driver(const struct consw *csw, int first, int last);