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

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