qubes-linux-kernel/patches.xen/add-console-use-vt
2011-04-19 22:09:59 +02:00

47 lines
1.7 KiB
Plaintext

Subject: add console_use_vt
From: kraxel@suse.de
Patch-mainline: no
$subject says all
--- 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);
+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 *,
@@ -1834,7 +1836,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;
@@ -3309,7 +3311,8 @@ int __init tty_init(void)
WARN_ON(device_create_file(consdev, &dev_attr_active) < 0);
#ifdef CONFIG_VT
- vty_init(&console_fops);
+ if (console_use_vt)
+ vty_init(&console_fops);
#endif
return 0;
}
--- 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; /*
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);