From: Gerd Knorr <kraxel@suse.de>
To: linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [patch 1/2] uml/xen: make the vt subsystem a runtime option
Date: Tue, 13 Dec 2005 16:06:52 +0100 [thread overview]
Message-ID: <439EE38C.6020602@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
Hi,
This patch enables the VT console to be disabled at runtime even if it
is built into the kernel. The UML framebuffer driver (patch follows)
depends on this. Xen will need that one too.
please apply,
Gerd
[-- Attachment #2: xen-vt-runtime --]
[-- Type: text/plain, Size: 1756 bytes --]
Subject: [patch] xen vt runtime
From: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>
This patch enables the VT console to be disabled at runtime even if it is
built into the kernel. Arch xen needs this to avoid trying to initialise a VT
in virtual machine that doesn't have access to the console hardware.
Signed-off-by: Ian Pratt <Ian.Pratt@cl.cam.ac.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Gerd Knorr <kraxel@suse.de>
Index: linux-2.6.14/drivers/char/tty_io.c
===================================================================
--- linux-2.6.14.orig/drivers/char/tty_io.c 2005-12-02 11:58:50.000000000 +0100
+++ linux-2.6.14/drivers/char/tty_io.c 2005-12-02 12:03:13.000000000 +0100
@@ -132,6 +132,8 @@ LIST_HEAD(tty_drivers); /* linked list
vt.c for deeply disgusting hack reasons */
DECLARE_MUTEX(tty_sem);
+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 */
@@ -1825,7 +1827,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;
@@ -3014,6 +3016,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)
@@ -3022,6 +3026,7 @@ static int __init tty_init(void)
class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
vty_init();
+ out_vt:
#endif
return 0;
}
next reply other threads:[~2005-12-13 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 15:06 Gerd Knorr [this message]
2005-12-13 15:16 ` [patch 2/2] uml: Framebuffer driver for UML Gerd Knorr
2005-12-13 22:15 ` Jeff Dike
2005-12-15 9:06 ` Gerd Knorr
2005-12-15 11:14 ` Gerd Knorr
2005-12-15 13:23 ` Gerd Knorr
2005-12-13 15:21 ` [patch 1/2] uml/xen: make the vt subsystem a runtime option Christoph Hellwig
2005-12-13 15:32 ` Gerd Knorr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=439EE38C.6020602@suse.de \
--to=kraxel@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox