public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] uml/xen: make the vt subsystem a runtime option
@ 2005-12-13 15:06 Gerd Knorr
  2005-12-13 15:16 ` [patch 2/2] uml: Framebuffer driver for UML Gerd Knorr
  2005-12-13 15:21 ` [patch 1/2] uml/xen: make the vt subsystem a runtime option Christoph Hellwig
  0 siblings, 2 replies; 8+ messages in thread
From: Gerd Knorr @ 2005-12-13 15:06 UTC (permalink / raw)
  To: linux kernel mailing list

[-- 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;
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-12-15 13:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-13 15:06 [patch 1/2] uml/xen: make the vt subsystem a runtime option Gerd Knorr
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox