From b48c2b70283912f2ea664a82d40065aeed5d0900 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 4 Jun 2024 12:39:38 +0200 Subject: dont spam xserver with false-positives 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 Part-of: --- src/evdev.c | 6 ++++-- 1 file 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) -- cgit v1.2.3