summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
Diffstat (limited to 'i386')
-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: