If read() fails on evdev devices, we deal with this in idev_evdev_hup().
It is very likely this is an async revoke, therefore, we must not abort.
Fix our io helper to discard such errors after passing them to
idev_evdev_hup(), so we don't bail out of the event loop.
error:
idev_evdev_hup(evdev);
error:
idev_evdev_hup(evdev);
+ return 0; /* idev_evdev_hup() handles the error so discard it */
}
static int idev_evdev_event_fn(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
}
static int idev_evdev_event_fn(sd_event_source *s, int fd, uint32_t revents, void *userdata) {