load-fragment: use config_parse_sec_fix_0() for TimeoutStopSec=
This commit is contained in:
@@ -291,7 +291,7 @@ Service.ExecStopPost, config_parse_exec, SERVICE_EXE
|
||||
Service.RestartSec, config_parse_sec, 0, offsetof(Service, restart_usec)
|
||||
Service.TimeoutSec, config_parse_service_timeout, 0, 0
|
||||
Service.TimeoutStartSec, config_parse_service_timeout, 0, 0
|
||||
Service.TimeoutStopSec, config_parse_service_timeout, 0, 0
|
||||
Service.TimeoutStopSec, config_parse_sec_fix_0, 0, offsetof(Service, timeout_stop_usec)
|
||||
Service.RuntimeMaxSec, config_parse_sec, 0, offsetof(Service, runtime_max_usec)
|
||||
Service.WatchdogSec, config_parse_sec, 0, offsetof(Service, watchdog_usec)
|
||||
m4_dnl The following five only exist for compatibility, they moved into Unit, see above
|
||||
|
||||
@@ -1944,7 +1944,7 @@ int config_parse_service_timeout(
|
||||
assert(rvalue);
|
||||
assert(s);
|
||||
|
||||
/* This is called for three cases: TimeoutSec=, TimeoutStopSec= and TimeoutStartSec=. */
|
||||
/* This is called for two cases: TimeoutSec= and TimeoutStartSec=. */
|
||||
|
||||
r = parse_sec(rvalue, &usec);
|
||||
if (r < 0) {
|
||||
@@ -1958,12 +1958,11 @@ int config_parse_service_timeout(
|
||||
if (usec <= 0)
|
||||
usec = USEC_INFINITY;
|
||||
|
||||
if (!streq(lvalue, "TimeoutStopSec")) {
|
||||
s->start_timeout_defined = true;
|
||||
s->timeout_start_usec = usec;
|
||||
}
|
||||
|
||||
if (!streq(lvalue, "TimeoutStartSec"))
|
||||
s->start_timeout_defined = true;
|
||||
s->timeout_start_usec = usec;
|
||||
|
||||
if (streq(lvalue, "TimeoutSec"))
|
||||
s->timeout_stop_usec = usec;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user