From 54f94e7cba562dc25d1b2445bbb8a8cf777b2a7c Mon Sep 17 00:00:00 2001 From: Marco Gerards Date: Mon, 2 Feb 2004 21:44:40 +0000 Subject: 2004-02-02 Marco Gerards * 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. --- ChangeLog | 8 ++++++++ i386/i386at/kd.c | 3 +++ i386/i386at/kd.h | 2 ++ i386/i386at/kd_event.c | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 813dda7..4f7c652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-02-02 Marco Gerards + + * 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 * 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: -- cgit v1.2.3