1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
diff -rup linux-2.6.20-xen.orig/drivers/char/tty_io.c linux-2.6.20-xen/drivers/char/tty_io.c
--- linux-2.6.20-xen.orig/drivers/char/tty_io.c 2007-07-16 11:14:52.000000000 -0700
+++ linux-2.6.20-xen/drivers/char/tty_io.c 2007-07-16 15:57:19.000000000 -0700
@@ -133,6 +133,8 @@ LIST_HEAD(tty_drivers); /* linked list
DEFINE_MUTEX(tty_mutex);
EXPORT_SYMBOL(tty_mutex);
+int console_use_vt = 1;
+
#ifdef CONFIG_UNIX98_PTYS
extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
extern int pty_limit; /* Config limit on Unix98 ptys */
@@ -2518,7 +2520,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 = console_driver;
index = fg_console;
@@ -3910,6 +3912,8 @@ static int __init tty_init(void)
#endif
#ifdef CONFIG_VT
+ if (!console_use_vt)
+ goto out_vt;
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
@@ -3917,6 +3921,7 @@ static int __init tty_init(void)
device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0");
vty_init();
+ out_vt:
#endif
return 0;
}
diff -rup linux-2.6.20-xen.orig/drivers/xen/console/console.c linux-2.6.20-xen/drivers/xen/console/console.c
--- linux-2.6.20-xen.orig/drivers/xen/console/console.c 2007-07-16 11:14:52.000000000 -0700
+++ linux-2.6.20-xen/drivers/xen/console/console.c 2007-07-16 16:02:26.000000000 -0700
@@ -86,23 +86,30 @@ static unsigned long sysrq_requested;
void xencons_early_setup(void)
{
- if (is_initial_xendomain())
+ extern int console_use_vt;
+
+ if (is_initial_xendomain()) {
xc_mode = XC_SERIAL;
- else
- xc_mode = XC_XVC;
+ } else {
+ xc_mode = XC_TTY;
+ console_use_vt = 0;
+ }
}
static int __init xencons_setup(char *str)
{
char *q;
int n;
+ extern int console_use_vt;
+ console_use_vt = 1;
if (!strncmp(str, "ttyS", 4)) {
xc_mode = XC_SERIAL;
str += 4;
} else if (!strncmp(str, "tty", 3)) {
xc_mode = XC_TTY;
str += 3;
+ console_use_vt = 0;
} else if (!strncmp(str, "xvc", 3)) {
xc_mode = XC_XVC;
str += 3;
|