2010-07-07 11:12:45 +00:00
|
|
|
Subject: add console_use_vt
|
|
|
|
From: kraxel@suse.de
|
|
|
|
Patch-mainline: no
|
|
|
|
|
|
|
|
$subject says all
|
|
|
|
|
2011-04-19 20:09:59 +00:00
|
|
|
--- head-2011-02-08.orig/drivers/tty/tty_io.c 2011-02-08 09:51:53.000000000 +0100
|
|
|
|
+++ head-2011-02-08/drivers/tty/tty_io.c 2011-01-31 14:30:58.000000000 +0100
|
|
|
|
@@ -140,6 +140,8 @@ EXPORT_SYMBOL(tty_mutex);
|
|
|
|
/* Spinlock to protect the tty->tty_files list */
|
|
|
|
DEFINE_SPINLOCK(tty_files_lock);
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
+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 *,
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1834,7 +1836,7 @@ retry_open:
|
2010-07-07 11:12:45 +00:00
|
|
|
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;
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -3309,7 +3311,8 @@ int __init tty_init(void)
|
|
|
|
WARN_ON(device_create_file(consdev, &dev_attr_active) < 0);
|
2010-07-07 11:12:45 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_VT
|
|
|
|
- vty_init(&console_fops);
|
|
|
|
+ if (console_use_vt)
|
|
|
|
+ vty_init(&console_fops);
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2011-04-19 20:09:59 +00:00
|
|
|
--- head-2011-02-08.orig/include/linux/console.h 2011-02-08 09:51:53.000000000 +0100
|
|
|
|
+++ head-2011-02-08/include/linux/console.h 2011-01-31 14:30:58.000000000 +0100
|
|
|
|
@@ -73,6 +73,7 @@ extern const struct consw dummy_con; /*
|
2010-07-07 11:12:45 +00:00
|
|
|
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);
|