diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-01-03 22:49:36 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-01-03 22:49:36 +0000 |
commit | 13d29f577b332c6fbda97311126e6ac3c00536ef (patch) | |
tree | 51d85c331ff7a485c465eb7a1170ac9d1f0854ba /sys/arch | |
parent | 225c8012ae5f5d5f742b95b0808d8b5e3bf56f71 (diff) |
call ukbd_cnattach() if the console keyboard is usb
[XXX this probbably doesn't belong here, but I haven't found a better
place yet and I'm bloody tired of using boot -d to set ukbd_is_console].
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc64/dev/consinit.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/consinit.c b/sys/arch/sparc64/dev/consinit.c index fb5386c23de..ceb33378739 100644 --- a/sys/arch/sparc64/dev/consinit.c +++ b/sys/arch/sparc64/dev/consinit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: consinit.c,v 1.4 2001/09/20 22:17:49 jason Exp $ */ +/* $OpenBSD: consinit.c,v 1.5 2002/01/03 22:49:35 jason Exp $ */ /* $NetBSD: consinit.c,v 1.9 2000/10/20 05:32:35 mrg Exp $ */ /*- @@ -30,6 +30,7 @@ */ #include "pcons.h" +#include "ukbd.h" #include <sys/param.h> #include <sys/systm.h> @@ -57,6 +58,8 @@ #include <sparc64/dev/cons.h> +#include <dev/usb/ukbdvar.h> + static void prom_cnprobe __P((struct consdev *)); static void prom_cninit __P((struct consdev *)); int prom_cngetc __P((dev_t)); @@ -200,8 +203,15 @@ consinit() if ((stdinnode = OF_instance_to_package(stdin)) == 0) { printf("WARNING: no PROM stdin\n"); - } - + } +#if NUKBD > 0 + else { + if (OF_getprop(stdinnode, "compatible", buffer, + sizeof(buffer)) != -1 && strncmp("usb", buffer, 3) == 0) + ukbd_cnattach(); + } +#endif + DBPRINT(("setting up stdout\r\n")); OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); |