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>
(cherry picked from commit 8dbce34b03)
This commit is contained in:
Peter Hutterer
2015-01-22 10:57:30 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 8874d83156
commit 2b5a60aca8
+1 -1
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) {