summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--i386/i386at/kd.c3
-rw-r--r--i386/i386at/kd.h2
-rw-r--r--i386/i386at/kd_event.c5
4 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 813dda7..4f7c652 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2004-01-19 Marco Gerards <metgerards@student.han.nl>
* linux/dev/glue/block.c (init_partition): Don't check for BSD
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: