summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/idev-evdev.c
AgeCommit message (Collapse)Author
2014-09-16terminal: remove dead code checking O_WRONLYDavid Herrmann
We only reject evdev FDs that are O_WRONLY as they're currently pretty useless. The following check for O_WRONLY is thus never excercised so drop it. Thanks to Thomas Andersen (via coverity)!
2014-09-11terminal: drop redundant assertionDavid Herrmann
This assertion is already there two lines down. Drop the redundant assertion.
2014-09-11terminal: fix wrong return value in idev if fcntl() failsDavid Herrmann
This might cause >=0 to be returned, even though the method failed. Fix this and return -errno.
2014-09-11terminal: remove redundant "struct" prefixesDavid Herrmann
We define typedefs for all internal types so drop the redundant "struct" prefix.
2014-09-11terminal: discard async read() errors for evdevDavid Herrmann
If read() fails on evdev devices, we deal with this in idev_evdev_hup(). It is very likely this is an async revoke, therefore, we must not abort. Fix our io helper to discard such errors after passing them to idev_evdev_hup(), so we don't bail out of the event loop.
2014-08-27terminal: add evdev elements to idevDavid Herrmann
The evdev-element provides linux evdev interfaces as idev-elements. This way, all real input hardware devices on linux can be used with the idev interface. We use libevdev to interface with the kernel. It's a simple wrapper library around the kernel evdev API that takes care to resync devices after kernel-queue overflows, which is a rather non-trivial task. Furthermore, it's a well tested interface used by all other major input users (Xorg, weston, libinput, ...). Last but not least, it provides nice keycode to keyname lookup tables (and vice versa), which is really nice for debugging input problems.