diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-24 15:00:06 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-20 06:17:42 +0900 |
commit | 100bc5bf98ed051e94667c9581f7098856527ee9 (patch) | |
tree | d202042ea23122e37373c5e1ac1bd10912dea990 /src/udev/udevd.c | |
parent | ebf963c551e1077abaa5e0fa0f330e6d1c23565e (diff) | |
download | systemd-100bc5bf98ed051e94667c9581f7098856527ee9.tar.gz |
udev-ctrl: make udev_ctrl_new() return negative errno on failure
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index a5c24a70f4..dd100dd92a 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1596,9 +1596,9 @@ static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cg .cgroup = cgroup, }; - manager->ctrl = udev_ctrl_new_from_fd(fd_ctrl); - if (!manager->ctrl) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to initialize udev control socket"); + r = udev_ctrl_new_from_fd(&manager->ctrl, fd_ctrl); + if (r < 0) + return log_error_errno(r, "Failed to initialize udev control socket: %m"); r = udev_ctrl_enable_receiving(manager->ctrl); if (r < 0) |