Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > d41cc2729f5f0fbbd2607b14a49457f3 > files > 2

kernel-xen-2.6.32.11-2mdv2010.1.src.rpm

Subject: add console_use_vt
From: kraxel@suse.de
Patch-mainline: no

$subject says all

--- sle11sp1-2010-03-01.orig/drivers/char/tty_io.c	2010-03-01 14:09:07.000000000 +0100
+++ sle11sp1-2010-03-01/drivers/char/tty_io.c	2010-03-01 14:09:43.000000000 +0100
@@ -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 *,
@@ -1736,7 +1738,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;
@@ -3138,7 +3140,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;
 }
--- sle11sp1-2010-03-01.orig/include/linux/console.h	2010-03-01 14:09:07.000000000 +0100
+++ sle11sp1-2010-03-01/include/linux/console.h	2009-10-12 12:16:48.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);