<div dir="ltr"><div>Hi,</div><div><br></div><div>Last week I was writing tests for evdev.c and I found one strange part in</div><div>it. It seems ioctl(fd, EVIOCGBIT(EV_SYN, EV_MAX), arg) cannot be decoded</div><div>correctly. I found that there are event types and event codes and</div><div>EVIOCGBIT(0, len) are used to get event types (not like others which are</div><div>used to get respective event codes). I asked on IRC and eSyr told me that</div><div>there's no EV_SYN in EVIOCGBIT, it's a bug in decoder. In order to fix</div><div>this bug, I read the kernel source code drivers/input/evdev.c and</div><div>include/uapi/linux/input-event-codes.h to find the cause and solution.</div><div>I modified that part of the decoder and it works.</div><div><br></div><div>TODO:</div><div>Part of my time was spent on figuring out those IOC_* macros and how</div><div>EVIOCGBIT really works so I didn't write many tests so this week I have to</div><div>catch up and finish tests for evdev.</div><div><br></div><div>Zhibin Li</div></div>