Ported change I6e56456e2f47af79b94932498d1abb1b42cf8584
libevdev: fix EvdevProbeMTSlot()
MTSlotInfoPtr is already a pointer, get the size of what it points to,
and pass its value, not its address, to the ioctl.
BUG=chromium-os:31878
TEST=boot chromebook; inspect /var/log/Xorg.0.log
=> No (EE) error messages related to EVIOCGMTSLOTS
Change-Id: I283d5ab3e3115c937b9888147c698eb26479ee06
diff --git a/src/libevdev.c b/src/libevdev.c
index abffe93..877a4bf 100644
--- a/src/libevdev.c
+++ b/src/libevdev.c
@@ -211,9 +211,9 @@
}
int EvdevProbeMTSlot(EvdevPtr device, MTSlotInfoPtr req) {
- if (ioctl(device->fd, EVIOCGMTSLOTS((sizeof(req))), &req) < 0) {
+ if (ioctl(device->fd, EVIOCGMTSLOTS((sizeof(*req))), req) < 0) {
LOG_ERROR(device, "ioctl EVIOCGMTSLOTS(req.code=%d) failed: %s\n",
- req->code, strerror(errno));
+ req->code, strerror(errno));
return !Success;
} else {
return Success;