summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorMarco Gerards <marco@gnu.org>2004-02-02 21:44:40 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:15:25 +0200
commit54f94e7cba562dc25d1b2445bbb8a8cf777b2a7c (patch)
treef381f7488d59e09abd8483ab2925081835bb6ab5 /i386/i386at
parent2dbf8e9a605e22f71cceb728c422fb609f41d736 (diff)
2004-02-02 Marco Gerards <metgerards@student.han.nl>
* i386/i386at/kd.c (kdinit): Initialize the input buffer. * i386/i386at/kd.h (KDSETLEDS): New macro. * i386/i386at/kd_event.c (kbdsetstat): Handle KDSETLEDS here to set the keyboard LEDs state.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/kd.c3
-rw-r--r--i386/i386at/kd.h2
-rw-r--r--i386/i386at/kd_event.c5
3 files changed, 10 insertions, 0 deletions
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index f2e6cfe..6a7eb44 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -1244,6 +1244,9 @@ kdinit()
enable the keyboard controller.
This keeps NUM-LOCK from being
set on the NEC Versa. */
+
+ /* Allocate the input buffer. */
+ ttychars(&kd_tty);
}
/*
diff --git a/i386/i386at/kd.h b/i386/i386at/kd.h
index 9dc2234..9abea8e 100644
--- a/i386/i386at/kd.h
+++ b/i386/i386at/kd.h
@@ -640,6 +640,8 @@ extern int kb_mode;
#define KDGKBDTYPE _IOR('K', 2, int) /* get keyboard type */
#define KB_VANILLAKB 0
+#define KDSETLEDS _IOW('K', 5, int) /* set the keyboard ledstate */
+
struct X_kdb {
u_int *ptr;
u_int size;
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index 898fd24..961d1b2 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -210,6 +210,11 @@ io_return_t kbdsetstat(dev, flavor, data, count)
/* XXX - what to do about unread events? */
/* XXX - should check that 'data' contains an OK valud */
break;
+ case KDSETLEDS:
+ if (count != 1)
+ return (D_INVALID_OPERATION);
+ kd_setleds1 (*data);
+ break;
case K_X_KDB_ENTER:
return X_kdb_enter_init(data, count);
case K_X_KDB_EXIT: