summaryrefslogtreecommitdiff
path: root/src/udev/udev-ctrl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-10 19:50:53 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-10 22:11:18 +0200
commit4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e (patch)
tree138bbc253a16c0f32ec69f68f596d2d88d33aafd /src/udev/udev-ctrl.c
parentfb0302ddbc47f61349286abfe7fbaa12c7069e25 (diff)
downloadsystemd-4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e.tar.gz
tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() call
Diffstat (limited to 'src/udev/udev-ctrl.c')
-rw-r--r--src/udev/udev-ctrl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c
index 59ce5c1f80..c3dc213aa8 100644
--- a/src/udev/udev-ctrl.c
+++ b/src/udev/udev-ctrl.c
@@ -20,6 +20,7 @@
#include "sd-event.h"
#include "alloc-util.h"
+#include "errno-util.h"
#include "fd-util.h"
#include "format-util.h"
#include "io-util.h"
@@ -261,9 +262,10 @@ static int udev_ctrl_event_handler(sd_event_source *s, int fd, uint32_t revents,
sock = accept4(fd, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK);
if (sock < 0) {
- if (errno != EINTR)
- log_error_errno(errno, "Failed to accept ctrl connection: %m");
- return 0;
+ if (ERRNO_IS_ACCEPT_AGAIN(errno))
+ return 0;
+
+ return log_error_errno(errno, "Failed to accept ctrl connection: %m");
}
/* check peer credential of connection */