Magellan Linux

Annotation of /trunk/kernel26-xen/patches-2.6.25-r1/1048-2.6.25-xen-add-console-use-vt.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 609 - (hide annotations) (download)
Fri May 23 17:35:37 2008 UTC (16 years ago) by niro
File size: 1753 byte(s)
-using opensuse xen patchset, updated kernel configs

1 niro 609 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     @@ -135,6 +135,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     extern int pty_limit; /* Config limit on Unix98 ptys */
23     @@ -2633,7 +2635,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     @@ -4114,6 +4116,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     @@ -4121,6 +4125,7 @@ static int __init tty_init(void)
42     device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "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);