2017-01-31 17:11:17 +00:00
|
|
|
From 9b01faa700c80007d2a25f92dc704b3e1aaf365d Mon Sep 17 00:00:00 2001
|
2017-01-29 22:22:41 +00:00
|
|
|
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");
|
|
|
|
}
|
|
|
|
|