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 (;;) {
|
for (;;) {
|
||||||
/* Wait for next message */
|
/* Wait for next message */
|
||||||
r = fd_wait_for_event(device_monitor_get_fd(udev_monitor->monitor), POLLIN, 0);
|
r = fd_wait_for_event(device_monitor_get_fd(udev_monitor->monitor), POLLIN, 0);
|
||||||
if (r < 0) {
|
if (r == -EINTR)
|
||||||
if (IN_SET(r, -EINTR, -EAGAIN))
|
continue;
|
||||||
continue;
|
if (r < 0)
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user