Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 9a31c1c7754dd25ef583d54398d4947b > files > 1

kernel-xen-2.6.30.2-5mdv2009.0.src.rpm

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(-)

--- head-2009-04-21.orig/drivers/char/tty_io.c	2009-04-21 10:18:50.000000000 +0200
+++ head-2009-04-21/drivers/char/tty_io.c	2009-04-21 10:31:34.000000000 +0200
@@ -136,6 +136,8 @@ LIST_HEAD(tty_drivers);			/* linked list
 DEFINE_MUTEX(tty_mutex);
 EXPORT_SYMBOL(tty_mutex);
 
+int console_use_vt = 1;
+
 static ssize_t tty_read(struct file *, char __user *, size_t, loff_t *);
 static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *);
 ssize_t redirected_tty_write(struct file *, const char __user *,
@@ -1784,7 +1786,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 = tty_driver_kref_get(console_driver);
 		index = fg_console;
@@ -3158,7 +3160,8 @@ static int __init tty_init(void)
 			      "console");
 
 #ifdef CONFIG_VT
-	vty_init(&console_fops);
+	if (console_use_vt)
+		vty_init(&console_fops);
 #endif
 	return 0;
 }
--- head-2009-04-21.orig/include/linux/console.h	2009-04-21 10:18:50.000000000 +0200
+++ head-2009-04-21/include/linux/console.h	2009-04-21 10:31:34.000000000 +0200
@@ -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);