mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-27 11:08:29 +00:00
evdev: EvdevProbe: check ioctl() return value and warn on failure.
Called function "ioctl" whose return value should be checked (checked 10 out of 11 times) Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -1782,8 +1782,9 @@ EvdevProbe(InputInfoPtr pInfo)
|
||||
xf86Msg(X_ERROR, "Grab failed. Device already configured?\n");
|
||||
return 1;
|
||||
}
|
||||
} else if (pEvdev->grabDevice) {
|
||||
ioctl(pInfo->fd, EVIOCGRAB, (void *)0);
|
||||
} else if (pEvdev->grabDevice && ioctl(pInfo->fd, EVIOCGRAB, (void *)0)) {
|
||||
xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
|
||||
strerror(errno));
|
||||
}
|
||||
|
||||
/* Trinary state for ignoring axes:
|
||||
|
||||
Reference in New Issue
Block a user