Zbigniew Jędrzejewski-Szmek d044ab
From d52e2bb9c20216972754c054e8534bca28baab66 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek d044ab
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Zbigniew Jędrzejewski-Szmek d044ab
Date: Mon, 17 Jul 2017 15:45:44 -0400
Zbigniew Jędrzejewski-Szmek d044ab
Subject: [PATCH] Use config_parse_sec_fix_0() also for JobRunningTimeoutSec
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
2d79a0bbb9f651656384a0a86ed814e6306fb5dd did that for TimeoutSec=,
Zbigniew Jędrzejewski-Szmek d044ab
89beff89edba592366b2960bd830d3f6e602c2c7 did that for JobTimeoutSec=,
Zbigniew Jędrzejewski-Szmek d044ab
and 0004f698df1410ef8b6ab3fb5f4b41a60c91182c did that for
Zbigniew Jędrzejewski-Szmek d044ab
x-systemd.device-timeout=. But after parsing x-systemd.device-timeout=xxx
Zbigniew Jędrzejewski-Szmek d044ab
we write it out as JobRunningTimeoutSec=xxx. Two options:
Zbigniew Jędrzejewski-Szmek d044ab
- write out JobRunningTimeoutSec=,
Zbigniew Jędrzejewski-Szmek d044ab
- change JobRunningTimeoutSec= to behave like the other options.
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
I think it would be confusing for JobRunningTimeoutSec= to have different
Zbigniew Jędrzejewski-Szmek d044ab
syntax then TimeoutSec= and JobTimeoutSec=, so this patch implements the
Zbigniew Jędrzejewski-Szmek d044ab
second option.
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
Fixes #6264, https://bugzilla.redhat.com/show_bug.cgi?id=1462378.
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
(cherry picked from commit 4a06cbf8387555c7c04a1ee6f0c5a6f858bf4b19)
Zbigniew Jędrzejewski-Szmek d044ab
---
Zbigniew Jędrzejewski-Szmek d044ab
 src/core/load-fragment-gperf.gperf.m4 | 2 +-
Zbigniew Jędrzejewski-Szmek d044ab
 1 file changed, 1 insertion(+), 1 deletion(-)
Zbigniew Jędrzejewski-Szmek d044ab
Zbigniew Jędrzejewski-Szmek d044ab
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
Zbigniew Jędrzejewski-Szmek d044ab
index 5b5a86250e..7fb39cf948 100644
Zbigniew Jędrzejewski-Szmek d044ab
--- a/src/core/load-fragment-gperf.gperf.m4
Zbigniew Jędrzejewski-Szmek d044ab
+++ b/src/core/load-fragment-gperf.gperf.m4
Zbigniew Jędrzejewski-Szmek d044ab
@@ -194,7 +194,7 @@ Unit.OnFailureIsolate,           config_parse_job_mode_isolate,      0,
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.IgnoreOnIsolate,            config_parse_bool,                  0,                             offsetof(Unit, ignore_on_isolate)
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.IgnoreOnSnapshot,           config_parse_warn_compat,           DISABLED_LEGACY,               0
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.JobTimeoutSec,              config_parse_sec_fix_0,             0,                             offsetof(Unit, job_timeout)
Zbigniew Jędrzejewski-Szmek d044ab
-Unit.JobRunningTimeoutSec,       config_parse_sec,                   0,                             offsetof(Unit, job_running_timeout)
Zbigniew Jędrzejewski-Szmek d044ab
+Unit.JobRunningTimeoutSec,       config_parse_sec_fix_0,             0,                             offsetof(Unit, job_running_timeout)
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.JobTimeoutAction,           config_parse_emergency_action,      0,                             offsetof(Unit, job_timeout_action)
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.JobTimeoutRebootArgument,   config_parse_unit_string_printf,    0,                             offsetof(Unit, job_timeout_reboot_arg)
Zbigniew Jędrzejewski-Szmek d044ab
 Unit.StartLimitIntervalSec,      config_parse_sec,                   0,                             offsetof(Unit, start_limit.interval)