From: Yu Watanabe Date: Fri, 25 May 2018 02:36:10 +0000 (+0900) Subject: load-fragment: make CPUSchedulingPolicy= accept the empty string X-Git-Tag: v239~179^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b00e1a9e2ac4fb52e9d96053231adf087f1eed0a;p=thirdparty%2Fsystemd.git load-fragment: make CPUSchedulingPolicy= accept the empty string --- diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 94583b5662a..4e1c721a791 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1189,6 +1189,13 @@ int config_parse_exec_cpu_sched_policy(const char *unit, assert(rvalue); assert(data); + if (isempty(rvalue)) { + c->cpu_sched_set = false; + c->cpu_sched_policy = SCHED_OTHER; + c->cpu_sched_priority = 0; + return 0; + } + x = sched_policy_from_string(rvalue); if (x < 0) { log_syntax(unit, LOG_ERR, filename, line, 0, "Failed to parse CPU scheduling policy, ignoring: %s", rvalue);