mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-25 12:39:18 +03:00
The only error that can be indicated by ppoll() in the revents field of struct pollfd when polling a line events file descriptor is POLLNVAL. It can happen if the user calls close() on said descriptor after retrieving it with gpiod_line_event_get_fd(). Currently we would act as if there's a line event to read. Make gpiod_line_event_wait() and its bulk variant return -1 and set errno to EINVAL in this case. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>