From: Yu Watanabe Date: Mon, 29 Nov 2021 19:07:24 +0000 (+0900) Subject: tree-wide: use ERRNO_IS_TRANSIENT() X-Git-Tag: v250-rc1~104^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8add30a03cb19e4a2722fa5a0fc08c277aaf67fd;p=thirdparty%2Fsystemd.git tree-wide: use ERRNO_IS_TRANSIENT() --- diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index 8ef354ee9ac..79bb33df847 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -453,7 +453,7 @@ int acquire_terminal( l = read(notify, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) continue; return -errno; diff --git a/src/core/cgroup.c b/src/core/cgroup.c index c942db8d05e..396de12c4f0 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -3191,7 +3191,7 @@ static int on_cgroup_inotify_event(sd_event_source *s, int fd, uint32_t revents, l = read(fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return log_error_errno(errno, "Failed to read control group inotify events: %m"); diff --git a/src/core/manager.c b/src/core/manager.c index c94f032cc05..780b1539130 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2445,18 +2445,19 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t } n = recvmsg_safe(m->notify_fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC|MSG_TRUNC); - if (IN_SET(n, -EAGAIN, -EINTR)) - return 0; /* Spurious wakeup, try again */ - if (n == -EXFULL) { - log_warning("Got message with truncated control data (too many fds sent?), ignoring."); - return 0; - } - if (n < 0) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + return 0; /* Spurious wakeup, try again */ + if (n == -EXFULL) { + log_warning("Got message with truncated control data (too many fds sent?), ignoring."); + return 0; + } /* If this is any other, real error, then let's stop processing this socket. This of course * means we won't take notification messages anymore, but that's still better than busy * looping around this: being woken up over and over again but being unable to actually read * the message off the socket. */ return log_error_errno(n, "Failed to receive notification message: %m"); + } CMSG_FOREACH(cmsg, &msghdr) { if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { @@ -2716,19 +2717,18 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t } n = read(m->signal_fd, &sfsi, sizeof(sfsi)); - if (n != sizeof(sfsi)) { - if (n >= 0) { - log_warning("Truncated read from signal fd (%zu bytes), ignoring!", n); - return 0; - } - - if (IN_SET(errno, EINTR, EAGAIN)) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(errno)) return 0; /* We return an error here, which will kill this handler, * to avoid a busy loop on read error. */ return log_error_errno(errno, "Reading from signal fd failed: %m"); } + if (n != sizeof(sfsi)) { + log_warning("Truncated read from signal fd (%zu bytes), ignoring!", n); + return 0; + } log_received_signal(sfsi.ssi_signo == SIGCHLD || (sfsi.ssi_signo == SIGTERM && MANAGER_IS_USER(m)) @@ -4263,7 +4263,7 @@ int manager_dispatch_user_lookup_fd(sd_event_source *source, int fd, uint32_t re l = recv(fd, &buffer, sizeof(buffer), MSG_DONTWAIT); if (l < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return log_error_errno(errno, "Failed to read from user lookup fd: %m"); diff --git a/src/core/path.c b/src/core/path.c index 999cecc96c6..29ec66fd4db 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -184,7 +184,7 @@ int path_spec_fd_event(PathSpec *s, uint32_t revents) { l = read(s->inotify_fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return log_error_errno(errno, "Failed to read inotify event: %m"); diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c index 65d7d98dbc4..d49fcedb57b 100644 --- a/src/home/homed-manager.c +++ b/src/home/homed-manager.c @@ -1122,10 +1122,11 @@ static int on_notify_socket(sd_event_source *s, int fd, uint32_t revents, void * assert(m); n = read_datagram(fd, &sender, &datagram, &passed_fd); - if (IN_SET(n, -EAGAIN, -EINTR)) - return 0; - if (n < 0) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + return 0; return log_error_errno(n, "Failed to read notify datagram: %m"); + } if (sender.pid <= 0) { log_warning("Received notify datagram without valid sender PID, ignoring."); diff --git a/src/import/importd.c b/src/import/importd.c index 66771f63e23..125b2dc8083 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -567,10 +567,11 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void int r; n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); - if (IN_SET(n, -EAGAIN, -EINTR)) - return 0; - if (n < 0) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + return 0; return (int) n; + } cmsg_close_all(&msghdr); diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index a9b745772bb..1b79e9366c2 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -326,7 +326,7 @@ static int server_read_dev_kmsg(Server *s) { return 0; } - if (IN_SET(errno, EAGAIN, EINTR, EPIPE)) + if (ERRNO_IS_TRANSIENT(errno) || errno == EPIPE) return 0; return log_error_errno(errno, "Failed to read from /dev/kmsg: %m"); diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 8e2990190ba..5ba9b3765b9 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -1317,14 +1317,15 @@ int server_process_datagram( iovec = IOVEC_MAKE(s->buffer, MALLOC_ELEMENTSOF(s->buffer) - 1); /* Leave room for trailing NUL we add later */ n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); - if (IN_SET(n, -EINTR, -EAGAIN)) - return 0; - if (n == -EXFULL) { - log_warning("Got message with truncated control data (too many fds sent?), ignoring."); - return 0; - } - if (n < 0) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + return 0; + if (n == -EXFULL) { + log_warning("Got message with truncated control data (too many fds sent?), ignoring."); + return 0; + } return log_error_errno(n, "recvmsg() failed: %m"); + } CMSG_FOREACH(cmsg, &msghdr) if (cmsg->cmsg_level == SOL_SOCKET && diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c index 26909840da9..d94b1df02dc 100644 --- a/src/journal/journald-stream.c +++ b/src/journal/journald-stream.c @@ -588,7 +588,7 @@ static int stdout_stream_process(sd_event_source *es, int fd, uint32_t revents, l = recvmsg(s->fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); if (l < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; log_warning_errno(errno, "Failed to read from stream: %m"); diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 45c2351c53e..14cbde133f8 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1945,7 +1945,7 @@ static int client_receive_message_udp( len = recv(fd, message, buflen, 0); if (len < 0) { /* see comment above for why we shouldn't error out on ENETDOWN. */ - if (IN_SET(errno, EAGAIN, EINTR, ENETDOWN)) + if (ERRNO_IS_TRANSIENT(errno) || errno == ENETDOWN) return 0; return log_dhcp_client_errno(client, errno, @@ -2035,12 +2035,12 @@ static int client_receive_message_raw( iov = IOVEC_MAKE(packet, buflen); len = recvmsg_safe(fd, &msg, 0); - if (IN_SET(len, -EAGAIN, -EINTR, -ENETDOWN)) - return 0; - if (len < 0) + if (len < 0) { + if (ERRNO_IS_TRANSIENT(len) || len == -ENETDOWN) + return 0; return log_dhcp_client_errno(client, len, "Could not receive message from raw socket: %m"); - + } if ((size_t) len < sizeof(DHCPPacket)) return 0; diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 261818b46ac..f535e316f90 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -1206,10 +1206,12 @@ static int server_receive_message(sd_event_source *s, int fd, iov = IOVEC_MAKE(message, datagram_size); len = recvmsg_safe(fd, &msg, 0); - if (IN_SET(len, -EAGAIN, -EINTR)) - return 0; - if (len < 0) + if (len < 0) { + if (ERRNO_IS_TRANSIENT(len)) + return 0; return len; + } + if ((size_t) len < sizeof(DHCPMessage)) return 0; diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 663e2d64b4b..29c8f78a8f9 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -1479,7 +1479,7 @@ static int client_receive_message( len = recvmsg_safe(fd, &msg, MSG_DONTWAIT); if (len < 0) { /* see comment above for why we shouldn't error out on ENETDOWN. */ - if (IN_SET(len, -EAGAIN, -EINTR, -ENETDOWN)) + if (ERRNO_IS_TRANSIENT(len) || len == -ENETDOWN) return 0; return log_dhcp6_client_errno(client, len, "Could not receive message from UDP socket: %m"); diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/sd-ipv4acd.c index 0a975fbbadf..9b35d2c48ea 100644 --- a/src/libsystemd-network/sd-ipv4acd.c +++ b/src/libsystemd-network/sd-ipv4acd.c @@ -362,7 +362,7 @@ static int ipv4acd_on_packet( n = recv(fd, &packet, sizeof(struct ether_arp), 0); if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; log_ipv4acd_errno(acd, errno, "Failed to read ARP packet: %m"); diff --git a/src/libsystemd-network/sd-lldp-rx.c b/src/libsystemd-network/sd-lldp-rx.c index 761e4b31282..4caed52a988 100644 --- a/src/libsystemd-network/sd-lldp-rx.c +++ b/src/libsystemd-network/sd-lldp-rx.c @@ -212,7 +212,7 @@ static int lldp_rx_receive_datagram(sd_event_source *s, int fd, uint32_t revents length = recv(fd, LLDP_NEIGHBOR_RAW(n), n->raw_size, MSG_DONTWAIT); if (length < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; log_lldp_rx_errno(lldp_rx, errno, "Failed to read LLDP datagram, ignoring: %m"); diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 3c916f24666..dd257eadfe8 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3142,7 +3142,7 @@ static int flush_timer(sd_event *e, int fd, uint32_t events, usec_t *next) { ss = read(fd, &x, sizeof(x)); if (ss < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; @@ -3348,7 +3348,7 @@ static int process_signal(sd_event *e, struct signal_data *d, uint32_t events, i n = read(d->fd, &si, sizeof(si)); if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; @@ -3402,7 +3402,7 @@ static int event_inotify_data_read(sd_event *e, struct inotify_data *d, uint32_t n = read(d->fd, &d->buffer, sizeof(d->buffer)); if (n < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index 738c6974687..4861726673c 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -2698,7 +2698,7 @@ _public_ int sd_journal_process(sd_journal *j) { l = read(j->inotify_fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return got_something ? determine_change(j) : SD_JOURNAL_NOP; return -errno; diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/sd-netlink/netlink-socket.c index 888b5bcf358..7197cb4daa4 100644 --- a/src/libsystemd/sd-netlink/netlink-socket.c +++ b/src/libsystemd/sd-netlink/netlink-socket.c @@ -235,12 +235,13 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *ret_mcast_gr assert(iov); n = recvmsg_safe(fd, &msg, MSG_TRUNC | (peek ? MSG_PEEK : 0)); - if (n == -ENOBUFS) - return log_debug_errno(n, "sd-netlink: kernel receive buffer overrun"); - if (IN_SET(n, -EAGAIN, -EINTR)) - return 0; - if (n < 0) + if (n < 0) { + if (n == -ENOBUFS) + return log_debug_errno(n, "sd-netlink: kernel receive buffer overrun"); + if (ERRNO_IS_TRANSIENT(n)) + return 0; return (int) n; + } if (sender.nl.nl_pid != 0) { /* not from the kernel, ignore */ diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c index dc48e918378..1f32a1eb46d 100644 --- a/src/libsystemd/sd-network/sd-network.c +++ b/src/libsystemd/sd-network/sd-network.c @@ -462,7 +462,7 @@ _public_ int sd_network_monitor_flush(sd_network_monitor *m) { l = read(fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return -errno; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 47658828367..8f17ab8810c 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -4211,14 +4211,15 @@ static int nspawn_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t r } n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); - if (IN_SET(n, -EAGAIN, -EINTR)) - return 0; - if (n == -EXFULL) { - log_warning("Got message with truncated control data (too many fds sent?), ignoring."); - return 0; - } - if (n < 0) + if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + return 0; + if (n == -EXFULL) { + log_warning("Got message with truncated control data (too many fds sent?), ignoring."); + return 0; + } return log_warning_errno(n, "Couldn't read notification socket: %m"); + } cmsg_close_all(&msghdr); diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index 719f6219bf0..f48e2a80298 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -323,7 +323,7 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use ssize_t ss = dns_stream_writev(s, iov, ELEMENTSOF(iov), 0); if (ss < 0) { - if (!IN_SET(-ss, EINTR, EAGAIN)) + if (!ERRNO_IS_TRANSIENT(ss)) return dns_stream_complete(s, -ss); } else { progressed = true; @@ -347,7 +347,7 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use ss = dns_stream_read(s, (uint8_t*) &s->read_size + s->n_read, sizeof(s->read_size) - s->n_read); if (ss < 0) { - if (!IN_SET(-ss, EINTR, EAGAIN)) + if (!ERRNO_IS_TRANSIENT(ss)) return dns_stream_complete(s, -ss); } else if (ss == 0) return dns_stream_complete(s, ECONNRESET); @@ -400,7 +400,7 @@ static int on_stream_io(sd_event_source *es, int fd, uint32_t revents, void *use (uint8_t*) DNS_PACKET_DATA(s->read_packet) + s->n_read - sizeof(s->read_size), sizeof(s->read_size) + be16toh(s->read_size) - s->n_read); if (ss < 0) { - if (!IN_SET(-ss, EINTR, EAGAIN)) + if (!ERRNO_IS_TRANSIENT(ss)) return dns_stream_complete(s, -ss); } else if (ss == 0) return dns_stream_complete(s, ECONNRESET); diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index 431093ad01c..6b32ee4cf07 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -792,10 +792,13 @@ int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) { iov = IOVEC_MAKE(DNS_PACKET_DATA(p), p->allocated); l = recvmsg_safe(fd, &mh, 0); - if (IN_SET(l, -EAGAIN, -EINTR)) - return 0; - if (l <= 0) + if (l < 0) { + if (ERRNO_IS_TRANSIENT(l)) + return 0; return l; + } + if (l == 0) + return 0; assert(!(mh.msg_flags & MSG_TRUNC)); diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index b6cdb995968..17474fe0be3 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -291,12 +291,13 @@ int ask_password_plymouth( k = read(fd, buffer + p, sizeof(buffer) - p); if (k < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) continue; r = -errno; goto finish; - } else if (k == 0) { + } + if (k == 0) { r = -EIO; goto finish; } @@ -522,7 +523,7 @@ int ask_password_tty( n = read(ttyfd >= 0 ? ttyfd : STDIN_FILENO, &c, 1); if (n < 0) { - if (IN_SET(errno, EINTR, EAGAIN)) + if (ERRNO_IS_TRANSIENT(errno)) continue; r = -errno; @@ -882,20 +883,21 @@ int ask_password_agent( }; n = recvmsg_safe(socket_fd, &msghdr, 0); - if (IN_SET(n, -EAGAIN, -EINTR)) - continue; - if (n == -EXFULL) { - log_debug("Got message with truncated control data, ignoring."); - continue; - } if (n < 0) { + if (ERRNO_IS_TRANSIENT(n)) + continue; + if (n == -EXFULL) { + log_debug("Got message with truncated control data, ignoring."); + continue; + } + r = (int) n; goto finish; } cmsg_close_all(&msghdr); - if (n <= 0) { + if (n == 0) { log_debug("Message too short"); continue; } diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 87061f55d7e..cbe54a60cd0 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -10,6 +10,7 @@ #include #include "barrier.h" +#include "errno-util.h" #include "fd-util.h" #include "io-util.h" #include "macro.h" @@ -178,7 +179,7 @@ static bool barrier_write(Barrier *b, uint64_t buf) { assert(b->me >= 0); do { len = write(b->me, &buf, sizeof(buf)); - } while (len < 0 && IN_SET(errno, EAGAIN, EINTR)); + } while (len < 0 && ERRNO_IS_TRANSIENT(errno)); if (len != sizeof(buf)) goto error; @@ -230,7 +231,7 @@ static bool barrier_read(Barrier *b, int64_t comp) { /* events on @them signal new data for us */ len = read(b->them, &buf, sizeof(buf)); - if (len < 0 && IN_SET(errno, EAGAIN, EINTR)) + if (len < 0 && ERRNO_IS_TRANSIENT(errno)) continue; if (len != sizeof(buf)) diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index aba483449a9..7e9ab19666e 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -190,7 +190,7 @@ static int connection_shovel( } else if (z == 0 || ERRNO_IS_DISCONNECT(errno)) { *from_source = sd_event_source_unref(*from_source); *from = safe_close(*from); - } else if (!IN_SET(errno, EAGAIN, EINTR)) + } else if (!ERRNO_IS_TRANSIENT(errno)) return log_error_errno(errno, "Failed to splice: %m"); } @@ -202,7 +202,7 @@ static int connection_shovel( } else if (z == 0 || ERRNO_IS_DISCONNECT(errno)) { *to_source = sd_event_source_unref(*to_source); *to = safe_close(*to); - } else if (!IN_SET(errno, EAGAIN, EINTR)) + } else if (!ERRNO_IS_TRANSIENT(errno)) return log_error_errno(errno, "Failed to splice: %m"); } } while (shoveled); diff --git a/src/timesync/wait-sync.c b/src/timesync/wait-sync.c index 606b0160a41..f42e6496bb3 100644 --- a/src/timesync/wait-sync.c +++ b/src/timesync/wait-sync.c @@ -85,7 +85,7 @@ static int inotify_handler(sd_event_source *s, l = read(fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 0; return log_warning_errno(errno, "Lost access to inotify: %m"); diff --git a/src/udev/udevd.c b/src/udev/udevd.c index d37652db670..8380d674c50 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1349,7 +1349,7 @@ static int on_inotify(sd_event_source *s, int fd, uint32_t revents, void *userda l = read(fd, &buffer, sizeof(buffer)); if (l < 0) { - if (IN_SET(errno, EAGAIN, EINTR)) + if (ERRNO_IS_TRANSIENT(errno)) return 1; return log_error_errno(errno, "Failed to read inotify fd: %m");