diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-21 19:40:43 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-21 19:40:43 +0000 |
commit | 5fe4d1465d5db4510bf37596322908b8491208b1 (patch) | |
tree | 8eb2f3e8d9f04b58ff6dcf1ebd49d2c314725a11 /sys/arch/hp300/dev | |
parent | 5e2b8b7c7670203701f318ad04376ecbf632de53 (diff) |
Do not attach dnkbd as a console keyboard if console is on serial.
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r-- | sys/arch/hp300/dev/dnkbd.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/arch/hp300/dev/dnkbd.c b/sys/arch/hp300/dev/dnkbd.c index 31200ba36c2..6294ea7a44f 100644 --- a/sys/arch/hp300/dev/dnkbd.c +++ b/sys/arch/hp300/dev/dnkbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dnkbd.c,v 1.9 2005/11/06 16:45:20 miod Exp $ */ +/* $OpenBSD: dnkbd.c,v 1.10 2005/12/21 19:40:42 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -40,6 +40,8 @@ #include <machine/autoconf.h> #include <machine/cpu.h> +#include <dev/cons.h> + #include <dev/wscons/wsconsio.h> #include <dev/wscons/wskbdvar.h> #include <dev/wscons/wsksymdef.h> @@ -273,6 +275,7 @@ dnkbd_attach_subdevices(struct dnkbd_softc *sc) #if NHILKBD > 0 extern int hil_is_console; #endif + extern struct consdev wsdisplay_cons; /* * If both hilkbd and dnkbd are configured, prefer the Domain @@ -282,15 +285,19 @@ dnkbd_attach_subdevices(struct dnkbd_softc *sc) * Unfortunately, the hil code will claim the console keyboard * even if no HIL keyboard is connected... */ + if (cn_tab == &wsdisplay_cons) { #if NHILKBD > 0 - if (hil_is_console == -1) { + if (hil_is_console == -1) { + ka.console = 1; + hil_is_console = 0; + } else + ka.console = 0; +#else ka.console = 1; - hil_is_console = 0; +#endif } else ka.console = 0; -#else - ka.console = 1; -#endif + ka.keymap = &dnkbd_keymapdata; ka.accessops = &dnkbd_accessops; ka.accesscookie = sc; |