From: Franck Bui Date: Fri, 17 Sep 2021 09:11:14 +0000 (+0200) Subject: core: introduce systemd.watchdog_sec= option X-Git-Tag: v250-rc1~510^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3aa73e4de614c06c4a27e5635967a0392654fbc;p=thirdparty%2Fsystemd.git core: introduce systemd.watchdog_sec= option --- diff --git a/src/core/main.c b/src/core/main.c index 8792ef88fc5..e2fc6fae61b 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -531,6 +531,17 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat (void) parse_path_argument(value, false, &arg_watchdog_device); + } else if (proc_cmdline_key_streq(key, "systemd.watchdog_sec")) { + + if (proc_cmdline_value_missing(key, value)) + return 0; + + r = parse_sec(value, &arg_runtime_watchdog); + if (r < 0) + log_warning_errno(r, "Failed to parse systemd.watchdog_sec= argument '%s', ignoring: %m", value); + else + arg_kexec_watchdog = arg_reboot_watchdog = arg_runtime_watchdog; + } else if (proc_cmdline_key_streq(key, "systemd.clock_usec")) { if (proc_cmdline_value_missing(key, value))