On So, 2017-03-26 at 11:53 +0200, Javier Celaya wrote: > The evdev devices in input-linux.c are read in blocks of one whole > event. If there are not enough bytes available, they are discarded, > instead of being kept for the next read operation. This results in > lost events, of even non-working devices.
Have you seen this happening in practice? > + struct input_event event; > + int to_be_read; I'd suggest to store offset (i.e. bytes already read) instead, should make the whole logic a bit simpler and easier to read. > + } else if (rc > 0){ checkpatch.pl complains here: ERROR: space required before the open brace '{' cheers, Gerd