From: Frantisek Sumsal Date: Fri, 27 Oct 2023 15:16:57 +0000 (+0200) Subject: core: actually set the CPU scheduling policy when deserializing it X-Git-Tag: v255-rc1~115^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4b156bb24b237d997773f29efefc82bf7687e64;p=thirdparty%2Fsystemd.git core: actually set the CPU scheduling policy when deserializing it --- diff --git a/src/core/execute-serialize.c b/src/core/execute-serialize.c index 63ed6a6afcf..18033fe9c30 100644 --- a/src/core/execute-serialize.c +++ b/src/core/execute-serialize.c @@ -2968,9 +2968,9 @@ static int exec_context_deserialize(ExecContext *c, FILE *f) { return r; c->ioprio_set = true; } else if ((val = startswith(l, "exec-context-cpu-scheduling-policy="))) { - r = sched_policy_from_string(val); - if (r < 0) - return r; + c->cpu_sched_policy = sched_policy_from_string(val); + if (c->cpu_sched_policy < 0) + return -EINVAL; c->cpu_sched_set = true; } else if ((val = startswith(l, "exec-context-cpu-scheduling-priority="))) { r = safe_atoi(val, &c->cpu_sched_priority);