mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 09:44:28 +00:00
Report errors when attempting to write keyboard controls
This is mostly to eliminate a compiler warning. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
7c1971d9e7
commit
e08b033276
@@ -1108,6 +1108,7 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
|
||||
InputInfoPtr pInfo;
|
||||
struct input_event ev[ArrayLength(bits) + 1];
|
||||
int i;
|
||||
int rc;
|
||||
|
||||
memset(ev, 0, sizeof(ev));
|
||||
|
||||
@@ -1122,7 +1123,9 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
|
||||
ev[i].code = SYN_REPORT;
|
||||
ev[i].value = 0;
|
||||
|
||||
write(pInfo->fd, ev, sizeof ev);
|
||||
rc = write(pInfo->fd, ev, sizeof ev);
|
||||
if (rc != sizeof ev)
|
||||
xf86IDrvMsg(pInfo, X_ERROR, "Failed to set keyboard controls: %s\n", strerror(errno));
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user