mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00: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>
(cherry picked from commit 8dbce34b03)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
8874d83156
commit
2b5a60aca8
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user