diff options
author | Tom Gundersen <teg@jklm.no> | 2015-06-02 19:18:53 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-06-03 01:41:35 +0200 |
commit | bf6871639e25119cf3f8b414890d51e965ca3f97 (patch) | |
tree | 36eb2cf102493afb81ba5331a9db23da7f91bead /src/udev | |
parent | fcff1e7241377b44f1d6e2a68ed55940b154ed4e (diff) |
udevd: only bind ctrl and netlink sockets when we open them
If they are passed from PID1 this is not necessary.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udevd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 1540f5c8f9..ccdec3de43 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1500,15 +1500,15 @@ static int manager_new(Manager **ret) { fd_uevent = udev_monitor_get_fd(manager->monitor); (void) udev_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024); - } - r = udev_monitor_enable_receiving(manager->monitor); - if (r < 0) - return log_error_errno(EINVAL, "error binding netlink socket"); + r = udev_monitor_enable_receiving(manager->monitor); + if (r < 0) + return log_error_errno(EINVAL, "error binding netlink socket"); - r = udev_ctrl_enable_receiving(manager->ctrl); - if (r < 0) - return log_error_errno(EINVAL, "error binding udev control socket"); + r = udev_ctrl_enable_receiving(manager->ctrl); + if (r < 0) + return log_error_errno(EINVAL, "error binding udev control socket"); + } *ret = manager; manager = NULL; |