Re: [ANNOUNCE] udev 171

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/26/2011 11:47 PM, Gabor Z. Papp wrote:
* Kay Sievers<kay.sievers@xxxxxxxx>:

| udev 171
| ========
| Bugfixes.

[...]

| udev 169
| ========
| Bugfixes.

| We require at least Linux kernel 2.6.32 now.

   CC     extras/input_id/input_id.o
extras/input_id/input_id.c: In function 'test_key':
extras/input_id/input_id.c:167: error: 'BTN_TRIGGER_HAPPY' undeclared (first use in this function)
extras/input_id/input_id.c:167: error: (Each undeclared identifier is reported only once
extras/input_id/input_id.c:167: error: for each function it appears in.)
make[2]: *** [extras/input_id/input_id.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

$ uname -a
Linux gzp 2.6.32.41 #1 SMP PREEMPT Tue May 24 09:17:23 CEST 2011 i686 GNU/Linux

I believe that BTN_TRIGGER_HAPPY was added to linux/input.h in the 2.6.34 kernel.

Given that the udev function in question is attempting to differentiate between KEY_* and BTN_* events and given that KEY_* and BTN_* events are intermixed numerically, I cannot think of a reliable solution (even the current implementation is not reliable).

When I wrote eventlircd, my solution to this problem (I wanted to separate keyboard events from mice and joystick events) was to write an awk script that created a look up array for KEY_* versus BTN_* by parsing linux/input.h. I used the autoconf archives macro AX_ABSOLUTE_HEADER to locate linux/input.h at build time in the configure phase. While not ideal, it was the best hack I could come up with.

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux