summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-06-04 12:39:38 +0200
committerEnrico Weigelt, metux IT consult <info@metux.net>2024-06-10 19:05:58 +0200
commitb48c2b70283912f2ea664a82d40065aeed5d0900 (patch)
treec5b745c65a3beb1c29ceb73a1cd5e7dc816614f3
parentaac329fd2a93651e79c2618f45e85dfbd99cd025 (diff)
dont spam xserver with false-positivesHEADmaster
It's not necessary to spam the xserver log with error messages of just temporary read failures that aren't actually errors. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev/-/merge_requests/6>
-rw-r--r--src/evdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b9555ef..ab4d7d6 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1077,11 +1077,13 @@ EvdevReadInput(InputInfoPtr pInfo)
do {
rc = libevdev_next_event(pEvdev->dev, LIBEVDEV_READ_FLAG_NORMAL, &ev);
if (rc < 0) {
- if (rc == -ENODEV) /* May happen after resume */
+ if (rc != -EAGAIN && rc != -EINTR && rc != -EWOULDBLOCK) {
+ /* May happen after resume or at device detach */
xf86RemoveEnabledDevice(pInfo);
- else if (rc != -EAGAIN)
+ EvdevCloseDevice(pInfo);
LogMessageVerbSigSafe(X_ERROR, 0, "%s: Read error: %s\n", pInfo->name,
strerror(-rc));
+ }
break;
} else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) {
if (pEvdev->mtdev)