summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-01-24 18:18:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-01-24 18:18:23 +0000
commite9ae768ce02ed4ee73befc52946f33b0ab1f5ce9 (patch)
treebda95231cffef0e768b867300581ef6ca051ada4 /sys
parentf94357d3e62ac2336f1e0185fba32d1ca190c24c (diff)
Do not attach hilkbd as console if we are running on a serial console.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/dev/hil_intio.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/hp300/dev/hil_intio.c b/sys/arch/hp300/dev/hil_intio.c
index 65d24aa781c..43c01ca68ae 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.1 2005/01/14 22:39:25 miod Exp $ */
+/* $OpenBSD: hil_intio.c,v 1.2 2005/01/24 18:18:22 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
@@ -30,10 +30,13 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/conf.h>
#include <machine/cpu.h>
#include <machine/intr.h>
+#include <dev/cons.h>
+
#include <hp300/dev/intiovar.h>
#include <machine/hil_machdep.h>
@@ -80,10 +83,16 @@ hil_intio_attach(struct device *parent, struct device *self, void *aux)
}
/*
- * For now, HIL is always considered as a valid console keyboard,
- * as we do not attach the Domain keyboard yet.
+ * Check that the configured console device is a wsdisplay.
*/
- hil_is_console = 1;
+ if (cdevsw[major(cn_tab->cn_dev)].d_open == wsdisplayopen) {
+ /*
+ * For now, HIL is always considered as a valid console
+ * keyboard, as we do not attach the Domain keyboard yet.
+ */
+ hil_is_console = 1;
+ } else
+ hil_is_console = 0;
hil_attach(sc, hil_is_console);