[PATCH 1/3] Report errors when attempting to write keyboard controls
Keith Packard
keithp at keithp.com
Tue May 31 16:29:48 UTC 2016
This is mostly to eliminate a compiler warning.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
src/evdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/evdev.c b/src/evdev.c
index 341db61..4cdfacd 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1122,7 +1122,9 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl)
ev[i].code = SYN_REPORT;
ev[i].value = 0;
- write(pInfo->fd, ev, sizeof ev);
+ i = write(pInfo->fd, ev, sizeof ev);
+ if (i != sizeof ev)
+ xf86IDrvMsg(pInfo, X_ERROR, "Failed to set keyboard controls\n");
}
static int
--
2.8.1
More information about the xorg-devel
mailing list