From f20e908529c7005fdc31c9e4e694b8c39291d10d Mon Sep 17 00:00:00 2001
From: Daniel Wagner <wagi@monom.org>
Date: Mon, 28 Nov 2016 18:24:26 +0100
Subject: [PATCH] udevd: check correct return value of fcntl() (#4758)
This looks like a copy&paste error from the code block above.
(cherry picked from commit a92cf7840ffefc279bc5cc409197d13752dec6e7)
---
src/udev/udevd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index badbab6205..c97c52e962 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1345,7 +1345,7 @@ static int listen_fds(int *rctrl, int *rnetlink) {
return log_error_errno(netlink_fd, "could not get uevent fd: %m");
netlink_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
- if (ctrl_fd < 0)
+ if (netlink_fd < 0)
return log_error_errno(errno, "could not dup netlink fd: %m");
}
--
2.9.3