diff options
author | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2012-08-16 16:38:05 +0000 |
---|---|---|
committer | Alexandr Shadchin <shadchin@cvs.openbsd.org> | 2012-08-16 16:38:05 +0000 |
commit | b6b7a17ad268ae42808934ae16cca477d5bdd3b6 (patch) | |
tree | 0e2f7f56e8b572df41d15903caac4c09517fac6d /driver/xf86-input-keyboard/src/sun_kbd.c | |
parent | c69adad12b7e8b838ac196edd22d50eae2c09767 (diff) |
Update to 1.6.2.
ok matthieu@
Diffstat (limited to 'driver/xf86-input-keyboard/src/sun_kbd.c')
-rw-r--r-- | driver/xf86-input-keyboard/src/sun_kbd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/driver/xf86-input-keyboard/src/sun_kbd.c b/driver/xf86-input-keyboard/src/sun_kbd.c index a2400872f..f1e530e9f 100644 --- a/driver/xf86-input-keyboard/src/sun_kbd.c +++ b/driver/xf86-input-keyboard/src/sun_kbd.c @@ -70,8 +70,9 @@ static void sunKbdSetLeds(InputInfoPtr pInfo, int leds) { int i; + uchar_t setleds = (uchar_t) (leds & 0xFF); - SYSCALL(i = ioctl(pInfo->fd, KIOCSLED, &leds)); + SYSCALL(i = ioctl(pInfo->fd, KIOCSLED, &setleds)); if (i < 0) { xf86Msg(X_ERROR, "%s: Failed to set keyboard LED's: %s\n", pInfo->name, strerror(errno)); @@ -82,14 +83,15 @@ sunKbdSetLeds(InputInfoPtr pInfo, int leds) static int sunKbdGetLeds(InputInfoPtr pInfo) { - int i, leds = 0; + int i; + uchar_t leds = 0; SYSCALL(i = ioctl(pInfo->fd, KIOCGLED, &leds)); if (i < 0) { xf86Msg(X_ERROR, "%s: Failed to get keyboard LED's: %s\n", pInfo->name, strerror(errno)); } - return leds; + return (int) leds; } @@ -495,6 +497,8 @@ OpenKeyboard(InputInfoPtr pInfo) kbdPath); pInfo->read_input = ReadInput; ret = TRUE; + /* in case it wasn't set and we fell back to default */ + xf86ReplaceStrOption(pInfo->options, "Device", kbdPath); } free(kbdPath); |