]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.xen/add-console-use-vt
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.xen / add-console-use-vt
1 Subject: add console_use_vt
2 From: kraxel@suse.de
3 Patch-mainline: no
4
5 $subject says all
6
7 ---
8 drivers/char/tty_io.c | 7 ++++++-
9 include/linux/console.h | 1 +
10 2 files changed, 7 insertions(+), 1 deletion(-)
11
12 --- a/drivers/char/tty_io.c
13 +++ b/drivers/char/tty_io.c
14 @@ -136,6 +136,8 @@ LIST_HEAD(tty_drivers); /* linked list
15 DEFINE_MUTEX(tty_mutex);
16 EXPORT_SYMBOL(tty_mutex);
17
18 +int console_use_vt = 1;
19 +
20 #ifdef CONFIG_UNIX98_PTYS
21 extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
22 static int ptmx_open(struct inode *, struct file *);
23 @@ -2200,7 +2202,7 @@ retry_open:
24 goto got_driver;
25 }
26 #ifdef CONFIG_VT
27 - if (device == MKDEV(TTY_MAJOR, 0)) {
28 + if (console_use_vt && device == MKDEV(TTY_MAJOR, 0)) {
29 extern struct tty_driver *console_driver;
30 driver = console_driver;
31 index = fg_console;
32 @@ -3729,6 +3731,8 @@ static int __init tty_init(void)
33 #endif
34
35 #ifdef CONFIG_VT
36 + if (!console_use_vt)
37 + goto out_vt;
38 cdev_init(&vc0_cdev, &console_fops);
39 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
40 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
41 @@ -3736,6 +3740,7 @@ static int __init tty_init(void)
42 device_create_drvdata(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
43
44 vty_init();
45 + out_vt:
46 #endif
47 return 0;
48 }
49 --- a/include/linux/console.h
50 +++ b/include/linux/console.h
51 @@ -63,6 +63,7 @@ extern const struct consw dummy_con; /*
52 extern const struct consw vga_con; /* VGA text console */
53 extern const struct consw newport_con; /* SGI Newport console */
54 extern const struct consw prom_con; /* SPARC PROM console */
55 +extern int console_use_vt;
56
57 int con_is_bound(const struct consw *csw);
58 int register_con_driver(const struct consw *csw, int first, int last);