WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: lircd - bug in uinput handling.

lircd - bug in uinput handling.

by Steffen Barszus-2 :: Rate this Message:

| View in Thread

Hi !

This is a bug, which Gerald Dachs pointed me to:

#define KEY_RESERVED            0
...
#define KEY_UNKNOWN             240
...
#define KEY_MAX                 0x2ff

Means most keys are stopped right now when using uinput with lircd.

Please find below the patch which should fix that.
diff --git a/daemons/lircd.c b/daemons/lircd.c
index 6c21a3a..0401c2f 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -432,7 +432,7 @@ int setup_uinputfd(const char *name)
                goto setup_error;
        }
 
-       for (key = KEY_RESERVED; key <= KEY_UNKNOWN; key++) {
+       for (key = KEY_RESERVED; key <= KEY_MAX; key++) {
                if (ioctl(fd, UI_SET_KEYBIT, key) != 0) {
                        goto setup_error;
                }

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d

 « Return to Thread: lircd - bug in uinput handling.