47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
Subject: add console_use_vt
|
|
From: kraxel@suse.de
|
|
Patch-mainline: no
|
|
|
|
$subject says all
|
|
|
|
--- head-2010-05-25.orig/drivers/char/tty_io.c 2010-05-25 09:12:10.000000000 +0200
|
|
+++ head-2010-05-25/drivers/char/tty_io.c 2010-05-25 09:13: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 *,
|
|
@@ -1778,7 +1780,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;
|
|
@@ -3160,7 +3162,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-2010-05-25.orig/include/linux/console.h 2010-05-25 09:12:10.000000000 +0200
|
|
+++ head-2010-05-25/include/linux/console.h 2010-01-19 14:51:01.000000000 +0100
|
|
@@ -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);
|