summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/idev-evdev.c
AgeCommit message (Collapse)Author
2015-07-27terminal: drop unfinished codeDavid Herrmann
This drops the libsystemd-terminal and systemd-consoled code for various reasons: * It's been sitting there unfinished for over a year now and won't get finished any time soon. * Since its initial creation, several parts need significant rework: The input handling should be replaced with the now commonly used libinput, the drm accessors should coordinate the handling of mode-object hotplugging (including split connectors) with other DRM users, and the internal library users should be converted to sd-device and friends. * There is still significant kernel work required before sd-console is really useful. This includes, but is not limited to, simpledrm and drmlog. * The authority daemon is needed before all this code can be used for real. And this will definitely take a lot more time to get done as no-one else is currently working on this, but me. * kdbus maintenance has taken up way more time than I thought and it has much higher priority. I don't see me spending much time on the terminal code in the near future. If anyone intends to hack on this, please feel free to contact me. I'll gladly help you out with any issues. Once kdbus and authorityd are finished (whenever that will be..) I'll definitely pick this up again. But until then, lets reduce compile times and maintenance efforts on this code and drop it for now.
2015-05-30terminal: fix include orderingThomas Hindoe Paaboel Andersen
2015-04-30terminal: update for simpler sd-bus api'sThomas Hindoe Paaboel Andersen
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-28treewide: more log_*_errno() conversions, multiline callsMichal Schmidt
Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
2014-09-22terminal: make evdev logind-matches per sessionDavid Herrmann
Instead of adding matches per device, we now add logind matches per session. This reduces the number of matches considerably and saves resources.
2014-09-22terminal: forward evdev RESYNC events to linked devicesDavid Herrmann
Whenever we resync an evdev device (or disable it), we should send RESYNC events to the linked upper layers. This allows to disable key-repeat and assume some events got dropped.
2014-09-22terminal: always call _enable/_disable on evdev devicesDavid Herrmann
The current pause/resume logic kinda intertwines the resume/pause and enable/disable functions. Lets avoid that non-obvious behavior and always make resume call into enable, and pause call into disable, if appropriate.
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.