From 2f5b282aab78bd2378df428c57c5fd1cc09e9f4f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Sep 2019 00:52:07 +0900 Subject: udevadm: missing initialization of descriptor --- src/udev/udev-ctrl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index b38370883f..751e034982 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -76,6 +76,7 @@ int udev_ctrl_new_from_fd(struct udev_ctrl **ret, int fd) { *uctrl = (struct udev_ctrl) { .n_ref = 1, .sock = fd >= 0 ? fd : TAKE_FD(sock), + .sock_connect = -1, .bound = fd >= 0, }; -- cgit v1.2.1 From f6e8ba816577a1a26037a8aeae23fda36d74f0ac Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Sep 2019 01:28:23 +0900 Subject: udevadm: use usec_add() Also fixes description of event source. --- src/udev/udev-ctrl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index 751e034982..f1befc7304 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -395,14 +395,13 @@ int udev_ctrl_wait(struct udev_ctrl *uctrl, usec_t timeout) { (void) sd_event_source_set_description(source_io, "udev-ctrl-wait-io"); if (timeout != USEC_INFINITY) { - usec_t usec; - - usec = now(clock_boottime_or_monotonic()) + timeout; - r = sd_event_add_time(uctrl->event, &source_timeout, clock_boottime_or_monotonic(), usec, 0, NULL, INT_TO_PTR(-ETIMEDOUT)); + r = sd_event_add_time(uctrl->event, &source_timeout, clock_boottime_or_monotonic(), + usec_add(now(clock_boottime_or_monotonic()), timeout), + 0, NULL, INT_TO_PTR(-ETIMEDOUT)); if (r < 0) return r; - (void) sd_event_source_set_description(source_timeout, "udev-ctrl-wait-io"); + (void) sd_event_source_set_description(source_timeout, "udev-ctrl-wait-timeout"); } return sd_event_loop(uctrl->event); -- cgit v1.2.1 From ce8a4ef13d48d27741e222d7474cd778b3a70bd2 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 18 Sep 2019 01:32:46 +0900 Subject: unit: add ExecReload= in systemd-udevd.service --- units/systemd-udevd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/units/systemd-udevd.service.in b/units/systemd-udevd.service.in index dbb678ae69..c257af0efa 100644 --- a/units/systemd-udevd.service.in +++ b/units/systemd-udevd.service.in @@ -23,6 +23,7 @@ Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket Restart=always RestartSec=0 ExecStart=@rootlibexecdir@/systemd-udevd +ExecReload=@rootbindir@/udevadm control --reload --timeout 0 KillMode=mixed WatchdogSec=3min TasksMax=infinity -- cgit v1.2.1