From 7f47e031d0ea64bafd82fddda67000dc56426fc8 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sun, 16 Feb 2003 02:08:05 +0000 Subject: 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. --- sbin/kbd/kbd_wscons.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sbin') 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) { -- cgit v1.2.3