summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-12-22 16:13:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-12-22 16:13:31 +0000
commit0c94a5a1c1330653b5dd97cc96915fe6c4db0552 (patch)
tree98ad49b6f4bbba5215b78d64c12ef40d49f82945 /sys/arch
parent8f9b9390c20239d45312954ee6fe6f0054951158 (diff)
Do not attempt to select keyboard layout until it has been determined from
the keyboard (oops). This also fixes a bad interaction with wskbd_cnattach that would hose the underlying sabtty device.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/comkbd_ebus.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sys/arch/sparc64/dev/comkbd_ebus.c b/sys/arch/sparc64/dev/comkbd_ebus.c
index f69408dd31a..4dd348f2769 100644
--- a/sys/arch/sparc64/dev/comkbd_ebus.c
+++ b/sys/arch/sparc64/dev/comkbd_ebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comkbd_ebus.c,v 1.9 2002/12/10 01:22:34 miod Exp $ */
+/* $OpenBSD: comkbd_ebus.c,v 1.10 2002/12/22 16:13:30 miod Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -234,26 +234,6 @@ comkbd_attach(parent, self, aux)
return;
}
- if (ISTYPE5(sc->sc_layout)) {
- a.keymap = &sunkbd5_keymapdata;
-#ifndef SUNKBD5_LAYOUT
- if (sc->sc_layout < MAXSUNLAYOUT &&
- sunkbd_layouts[sc->sc_layout] != -1)
- sunkbd5_keymapdata.layout =
- sunkbd_layouts[sc->sc_layout];
-#endif
- } else {
- a.keymap = &sunkbd_keymapdata;
-#ifndef SUNKBD_LAYOUT
- if (sc->sc_layout < MAXSUNLAYOUT &&
- sunkbd_layouts[sc->sc_layout] != -1)
- sunkbd_keymapdata.layout =
- sunkbd_layouts[sc->sc_layout];
-#endif
- }
- a.accessops = &comkbd_accessops;
- a.accesscookie = sc;
-
if (console) {
comkbd_init(sc);
cn_tab->cn_dev = makedev(77, sc->sc_dv.dv_unit); /* XXX */
@@ -271,6 +251,26 @@ comkbd_attach(parent, self, aux)
} else
printf("\n");
+ a.console = console;
+ if (ISTYPE5(sc->sc_layout)) {
+ a.keymap = &sunkbd5_keymapdata;
+#ifndef SUNKBD5_LAYOUT
+ if (sc->sc_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[sc->sc_layout] != -1)
+ sunkbd5_keymapdata.layout =
+ sunkbd_layouts[sc->sc_layout];
+#endif
+ } else {
+ a.keymap = &sunkbd_keymapdata;
+#ifndef SUNKBD_LAYOUT
+ if (sc->sc_layout < MAXSUNLAYOUT &&
+ sunkbd_layouts[sc->sc_layout] != -1)
+ sunkbd_keymapdata.layout =
+ sunkbd_layouts[sc->sc_layout];
+#endif
+ }
+ a.accessops = &comkbd_accessops;
+ a.accesscookie = sc;
sc->sc_wskbddev = config_found(self, &a, wskbddevprint);
}