summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/hil_intio.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-04-22 11:56:20 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-04-22 11:56:20 +0000
commit2859385583ab340f0cbf668de9bb48e8553d3e76 (patch)
treee157be17ab2c9fd1f56a90e9fcccb22fdd1df6d0 /sys/arch/hp300/dev/hil_intio.c
parent7b2adecacf3eb27766586090a898e69aa8b12c33 (diff)
Allow an external device to force the HIL loop to not claim the keyboard
console.
Diffstat (limited to 'sys/arch/hp300/dev/hil_intio.c')
-rw-r--r--sys/arch/hp300/dev/hil_intio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/hp300/dev/hil_intio.c b/sys/arch/hp300/dev/hil_intio.c
index 3d5a3373f1a..42322fc35ec 100644
--- a/sys/arch/hp300/dev/hil_intio.c
+++ b/sys/arch/hp300/dev/hil_intio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hil_intio.c,v 1.3 2005/02/20 23:05:05 miod Exp $ */
+/* $OpenBSD: hil_intio.c,v 1.4 2005/04/22 11:56:19 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -68,12 +68,12 @@ static int hil_matched = 0;
}
struct isr hil_isr;
+int hil_is_console = -1;
void
hil_intio_attach(struct device *parent, struct device *self, void *aux)
{
struct hil_softc *sc = (void *)self;
- int hil_is_console;
extern struct consdev wsdisplay_cons;
sc->sc_bst = HP300_BUS_TAG(HP300_BUS_INTIO, 0);
@@ -88,10 +88,11 @@ hil_intio_attach(struct device *parent, struct device *self, void *aux)
*/
if (cn_tab == &wsdisplay_cons) {
/*
- * For now, HIL is always considered as a valid console
- * keyboard, as we do not attach the Domain keyboard yet.
+ * If we did not find and attach a Domain keyboard earlier,
+ * claim the console keyboard.
*/
- hil_is_console = 1;
+ if (hil_is_console == -1)
+ hil_is_console = 1;
} else {
hil_is_console = 0;
}