1
0
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:
Peter Hutterer 2015-01-22 11:36:02 +10:00 committed by Zbigniew Jędrzejewski-Szmek
parent b5b38b41c3
commit 8dbce34b03
Notes: Lennart Poettering 2015-01-23 01:19:28 +01:00
Backport: bugfix

View File

@ -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) {