diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-02-16 02:08:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-02-16 02:08:05 +0000 |
commit | 7f47e031d0ea64bafd82fddda67000dc56426fc8 (patch) | |
tree | f8631a20d4e441dd911159ad89c226dcd2e7884f | |
parent | 4241fa28fefb7d8629a28b063203c78f1ba91fac (diff) |
Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.
-rw-r--r-- | sbin/kbd/kbd_wscons.c | 11 | ||||
-rw-r--r-- | sys/arch/hppa/gsc/gsckbd.c | 4 | ||||
-rw-r--r-- | sys/dev/wscons/wsconsio.h | 3 |
3 files changed, 14 insertions, 4 deletions
diff --git a/sbin/kbd/kbd_wscons.c b/sbin/kbd/kbd_wscons.c index fcbb685d853..9167097d16d 100644 --- a/sbin/kbd/kbd_wscons.c +++ b/sbin/kbd/kbd_wscons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd_wscons.c,v 1.10 2003/02/12 09:00:40 maja Exp $ */ +/* $OpenBSD: kbd_wscons.c,v 1.11 2003/02/16 02:08:02 miod Exp $ */ /* * Copyright (c) 2001 Mats O Jansson. All rights reserved. @@ -53,6 +53,7 @@ #define SA_SUNKBD 4 #define SA_SUN5KBD 5 #define SA_HILKBD 6 +#define SA_GSCKBD 7 struct nlist nl[] = { { "_pckbd_keydesctab" }, @@ -62,6 +63,7 @@ struct nlist nl[] = { { "_sunkbd_keydesctab" }, { "_sunkbd5_keydesctab" }, { "_hilkbd_keydesctab" }, + { "_gsckbd_keydesctab" }, { NULL }, }; @@ -73,6 +75,7 @@ char *kbtype_tab[] = { "sun", "sun5", "hil", + "gsc", }; struct nameint { @@ -159,6 +162,7 @@ kbd_list(void) int sun_kbd = 0; int sun5_kbd = 0; int hil_kbd = 0; + int gsc_kbd = 0; /* Go through all keyboards. */ for (i = 0; i < NUM_KBD; i++) { @@ -184,6 +188,8 @@ kbd_list(void) sun5_kbd++; if (kbtype == WSKBD_TYPE_HIL) hil_kbd++; + if (kbtype == WSKBD_TYPE_GSC) + gsc_kbd++; close(fd); } } @@ -216,6 +222,9 @@ kbd_list(void) if (hil_kbd > 0) kbd_show_enc(kd, SA_HILKBD); + if (gsc_kbd > 0) + kbd_show_enc(kd, SA_GSCKBD); + kvm_close(kd); if (rebuild > 0) { diff --git a/sys/arch/hppa/gsc/gsckbd.c b/sys/arch/hppa/gsc/gsckbd.c index 60222b439af..eeca7697d33 100644 --- a/sys/arch/hppa/gsc/gsckbd.c +++ b/sys/arch/hppa/gsc/gsckbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gsckbd.c,v 1.3 2003/02/15 23:42:45 miod Exp $ */ +/* $OpenBSD: gsckbd.c,v 1.4 2003/02/16 02:08:04 miod Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -527,7 +527,7 @@ gsckbd_ioctl(v, cmd, data, flag, p) switch (cmd) { case WSKBDIO_GTYPE: - *(int *)data = WSKBD_TYPE_PC_XT; + *(int *)data = WSKBD_TYPE_GSC; return 0; case WSKBDIO_SETLEDS: { diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h index 93487a213ec..7a9dd46f4ef 100644 --- a/sys/dev/wscons/wsconsio.h +++ b/sys/dev/wscons/wsconsio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsconsio.h,v 1.25 2003/02/12 01:44:11 miod Exp $ */ +/* $OpenBSD: wsconsio.h,v 1.26 2003/02/16 02:08:04 miod Exp $ */ /* $NetBSD: wsconsio.h,v 1.31.2.1 2000/07/07 09:49:17 hannken Exp $ */ /* @@ -112,6 +112,7 @@ struct wscons_event { #define WSKBD_TYPE_SUN 11 /* Sun Type3/4 */ #define WSKBD_TYPE_SUN5 12 /* Sun Type5 */ #define WSKBD_TYPE_HIL 13 /* HP HIL */ +#define WSKBD_TYPE_GSC 14 /* HP PS/2 */ /* Manipulate the keyboard bell. */ struct wskbd_bell_data { |