[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0dd0991d71cac0a746891863264941c100bbc67a.1273825543.git.soren@linux2go.dk>
Date: Fri, 14 May 2010 18:10:12 +0200
From: Soren Hansen <soren@...ux2go.dk>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] Allow hvc tty's to pose as vt's
Allow for hvc based tty's to take over the vt driver's major number
and namespace.
Signed-off-by: Soren Hansen <soren@...ux2go.dk>
Tested-By: Major Hayden <major.hayden@...kspace.com>
---
drivers/char/Kconfig | 9 ++++++++-
drivers/char/hvc_console.c | 9 +++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 6aad99e..8610179 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -5,7 +5,7 @@
menu "Character devices"
config VT
- bool "Virtual terminal" if EMBEDDED
+ bool "Virtual terminal"
depends on !S390
select INPUT
default y
@@ -602,6 +602,13 @@ config PPDEV
If unsure, say N.
+config HVC_TTY_HACK
+ bool "Apply various hacks to make hvc[0-] pretend to be tty[1-]"
+ depends on !VT
+ help
+ Make unsuspecting guests work happily with the hvc concoles by
+ tricking them into thinking they're plain old ttys.
+
config HVC_DRIVER
bool
help
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index a632f25..4c6b03d 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -43,7 +43,11 @@
#include "hvc_console.h"
+#ifdef CONFIG_HVC_TTY_HACK
+#define HVC_MAJOR 4
+#else /* CONFIG_HVC_TTY_HACK */
#define HVC_MAJOR 229
+#endif /* CONFIG_HVC_TTY_HACK */
#define HVC_MINOR 0
/*
@@ -848,7 +852,12 @@ static int hvc_init(void)
drv->owner = THIS_MODULE;
drv->driver_name = "hvc";
+#ifdef CONFIG_HVC_TTY_HACK
+ drv->name = "tty";
+ drv->name_base = 1;
+#else /* CONFIG_HVC_TTY_HACK */
drv->name = "hvc";
+#endif /* CONFIG_HVC_TTY_HACK */
drv->major = HVC_MAJOR;
drv->minor_start = HVC_MINOR;
drv->type = TTY_DRIVER_TYPE_SYSTEM;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists