summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>2002-02-19 01:49:59 +0000
committerMats O Jansson <maja@cvs.openbsd.org>2002-02-19 01:49:59 +0000
commit2681ae46a57efba41ff6c6b805673ede03f6097e (patch)
treef8984bcab9697d4194a46ff65257ad65b77ca4cf
parent75c956c0d418370c31e8046ecf265b58bb65e19c (diff)
Add support for sparc64 and sun keyboards. -moj
-rw-r--r--sbin/kbd/Makefile5
-rw-r--r--sbin/kbd/kbd_wscons.c11
2 files changed, 13 insertions, 3 deletions
diff --git a/sbin/kbd/Makefile b/sbin/kbd/Makefile
index 475c6b59eb7..2d3a0533322 100644
--- a/sbin/kbd/Makefile
+++ b/sbin/kbd/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2001/10/24 05:38:21 maja Exp $
+# $OpenBSD: Makefile,v 1.13 2002/02/19 01:49:57 maja Exp $
PROG= kbd
MAN= kbd.8
@@ -9,7 +9,8 @@ CFLAGS+=-I${.CURDIR}
.if (${MACHINE} == "arc")
SRCS+= kbd_i386.c
.elif (${MACHINE} == "i386") || (${MACHINE} == "macppc") || \
- (${MACHINE} == "vax") || (${MACHINE} == "alpha")
+ (${MACHINE} == "vax") || (${MACHINE} == "alpha") || \
+ (${MACHINE} == "sparc64")
SRCS+= kbd_wscons.c
LDADD= -lkvm
DPADD= ${LIBKVM}
diff --git a/sbin/kbd/kbd_wscons.c b/sbin/kbd/kbd_wscons.c
index 68b3d99b41f..1c4ce389824 100644
--- a/sbin/kbd/kbd_wscons.c
+++ b/sbin/kbd/kbd_wscons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kbd_wscons.c,v 1.4 2001/07/07 18:26:14 deraadt Exp $ */
+/* $OpenBSD: kbd_wscons.c,v 1.5 2002/02/19 01:49:58 maja Exp $ */
/*
* Copyright (c) 2001 Mats O Jansson. All rights reserved.
@@ -49,12 +49,14 @@
#define SA_UKBD 1
#define SA_AKBD 2
#define SA_ZSKBD 3
+#define SA_SUNKBD 4
struct nlist nl[] = {
{ "_pckbd_keydesctab" },
{ "_ukbd_keydesctab" },
{ "_akbd_keydesctab" },
{ "_zskbd_keydesctab" },
+ { "_sunkbd_keydesctab" },
{ NULL },
};
@@ -63,6 +65,7 @@ char *kbtype_tab[] = {
"usb",
"adb",
"lk201",
+ "sun",
};
struct nameint {
@@ -146,6 +149,7 @@ kbd_list()
int usb_kbd = 0;
int adb_kbd = 0;
int zs_kbd = 0;
+ int sun_kbd = 0;
/* Go through all keyboards. */
for (i = 0; i < NUM_KBD; i++) {
@@ -165,6 +169,8 @@ kbd_list()
adb_kbd++;
if (kbtype == WSKBD_TYPE_LK201)
zs_kbd++;
+ if (kbtype == WSKBD_TYPE_SUN)
+ sun_kbd++;
close(fd);
}
}
@@ -187,6 +193,9 @@ kbd_list()
if (zs_kbd > 0)
kbd_show_enc(kd, SA_ZSKBD);
+ if (sun_kbd > 0)
+ kbd_show_enc(kd, SA_SUNKBD);
+
kvm_close(kd);
if (rebuild > 0) {