From: Daan De Meyer Date: Wed, 31 May 2023 14:16:21 +0000 (+0200) Subject: core: Add systemd.default_device_timeout_sec= cmdline option X-Git-Tag: v254-rc1~301^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b818cd7e53a0beec07a068c7bb6a3c0dbf8f7c0;p=thirdparty%2Fsystemd.git core: Add systemd.default_device_timeout_sec= cmdline option --- diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml index 211ae5ac571..479b482a308 100644 --- a/man/kernel-command-line.xml +++ b/man/kernel-command-line.xml @@ -423,6 +423,16 @@ + + systemd.default_device_timeout_sec= + + + Overrides the default device timeout DefaultDeviceTimeoutSec= at boot. For + details, see + systemd-system.conf5. + + + systemd.watchdog_device= diff --git a/src/core/main.c b/src/core/main.c index c69f9b9afee..3eb53577eba 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -400,6 +400,18 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat if (arg_default_timeout_start_usec <= 0) arg_default_timeout_start_usec = USEC_INFINITY; + } else if (proc_cmdline_key_streq(key, "systemd.default_device_timeout_sec")) { + + if (proc_cmdline_value_missing(key, value)) + return 0; + + r = parse_sec(value, &arg_default_device_timeout_usec); + if (r < 0) + log_warning_errno(r, "Failed to parse default device timeout '%s', ignoring: %m", value); + + if (arg_default_device_timeout_usec <= 0) + arg_default_device_timeout_usec = USEC_INFINITY; + } else if (proc_cmdline_key_streq(key, "systemd.cpu_affinity")) { if (proc_cmdline_value_missing(key, value))