mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-04 17:47:03 +03:00
libudev: shorten code a bit
fd_wait_for_event() or ppoll() does not return -EAGAIN.
This commit is contained in:
parent
dbdcd51f78
commit
1d61d70abb
@ -206,12 +206,10 @@ static int udev_monitor_receive_sd_device(struct udev_monitor *udev_monitor, sd_
|
||||
for (;;) {
|
||||
/* Wait for next message */
|
||||
r = fd_wait_for_event(device_monitor_get_fd(udev_monitor->monitor), POLLIN, 0);
|
||||
if (r < 0) {
|
||||
if (IN_SET(r, -EINTR, -EAGAIN))
|
||||
continue;
|
||||
|
||||
if (r == -EINTR)
|
||||
continue;
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
if (r == 0)
|
||||
return -EAGAIN;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user