mirror of
https://github.com/systemd/systemd.git
synced 2025-01-13 17:18:18 +03:00
logind: fix sd_eviocrevoke ioctl call
If the third argument is non-null, the kernel will always error out with EINVAL and devices won't get revoked. Reported-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b5b38b41c3
commit
8dbce34b03
Notes:
Lennart Poettering
2015-01-23 01:19:28 +01:00
Backport: bugfix
@ -107,7 +107,7 @@ static int sd_eviocrevoke(int fd) {
|
||||
|
||||
assert(fd >= 0);
|
||||
|
||||
r = ioctl(fd, EVIOCREVOKE, 1);
|
||||
r = ioctl(fd, EVIOCREVOKE, NULL);
|
||||
if (r < 0) {
|
||||
r = -errno;
|
||||
if (r == -EINVAL && !warned) {
|
||||
|
Loading…
Reference in New Issue
Block a user