summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>2024-05-27 17:17:52 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-06-19 12:36:53 +0200
commitfdd4263cac327a3bc447560dbd46713524046099 (patch)
tree070afd101f2fc432d608ec875d10438e4b549f20 /src/udev
parentUse consistent spelling of systemd.condition_first_boot argument (diff)
downloadsystemd-fdd4263cac327a3bc447560dbd46713524046099.tar.xz
systemd-fdd4263cac327a3bc447560dbd46713524046099.zip
udev-spawn: fix typo and simplify code
Follow-up for 11706971e8b6aa289af56454330fffd87f5d5a78
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-spawn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/udev/udev-spawn.c b/src/udev/udev-spawn.c
index 3f867a8eb2..d2a422f7e8 100644
--- a/src/udev/udev-spawn.c
+++ b/src/udev/udev-spawn.c
@@ -349,13 +349,12 @@ void udev_event_execute_run(UdevEvent *event) {
log_device_debug_errno(event->dev, r, "Failed to run built-in command \"%s\", ignoring: %m", command);
} else {
if (event->worker && event->worker->exec_delay_usec > 0) {
- usec_t timeout_usec = event->worker ? event->worker->timeout_usec : DEFAULT_WORKER_TIMEOUT_USEC;
usec_t now_usec = now(CLOCK_MONOTONIC);
usec_t age_usec = usec_sub_unsigned(now_usec, event->birth_usec);
- if (event->worker->exec_delay_usec >= usec_sub_unsigned(timeout_usec, age_usec)) {
+ if (event->worker->exec_delay_usec >= usec_sub_unsigned(event->worker->timeout_usec, age_usec)) {
log_device_warning(event->dev,
- "Cannot delaying execution of \"%s\" for %s, skipping.",
+ "Cannot delay execution of \"%s\" for %s, skipping.",
command, FORMAT_TIMESPAN(event->worker->exec_delay_usec, USEC_PER_SEC));
continue;
}