logind: make use of EVIOCSMASK input ioctl to mask out events we aren't interested in
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Jun 2017 19:35:12 +0000 (21:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Jun 2017 17:25:46 +0000 (19:25 +0200)
commitd5dd44b01c225f20166f2e004e41f72c3ea95b5a
treebc326d7df53490413d97136d99eb41aaf68b2d3b
parent180f6dbd2ca648f8eaa2ab911daea7a1f8853408
logind: make use of EVIOCSMASK input ioctl to mask out events we aren't interested in

This way logind will get woken up only when an actual event took place,
and not for every key press on the system.

The ioctl EVIOCSMASK was added by @dvdhrm already in October 2015, for
the use in logind, among others, hence let's actually make use of it
now.

While we are at it, also fix usage of the EVIOCGSW ioctl, where we
assumed a byte array, even though a unsigned long native endian array is
returned.
src/basic/missing.h
src/login/logind-button.c