1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00

udevd: only bind ctrl and netlink sockets when we open them

If they are passed from PID1 this is not necessary.
This commit is contained in:
Tom Gundersen 2015-06-02 19:18:53 +02:00
parent fcff1e7241
commit bf6871639e

View File

@ -1500,16 +1500,16 @@ 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_ctrl_enable_receiving(manager->ctrl);
if (r < 0)
return log_error_errno(EINVAL, "error binding udev control 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");
*ret = manager;
manager = NULL;