summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-08-14 18:03:35 -0400
committerGitHub <noreply@github.com>2016-08-14 18:03:35 -0400
commit5f9a610ad2b3200a31bbd9181c810726eeb30385 (patch)
tree4f8b0e5a15d297dcf2d69802cdc9b7e08524384d /src/core/unit.c
parent04d0f7e9f9e2d68502f322b8f494c652cbeb5146 (diff)
parent66ebf6c0a1005f90099e25ece5630551ad97a3c3 (diff)
Merge pull request #3905 from htejun/cgroup-v2-cpu
core: add cgroup CPU controller support on the unified hierarchy (zj: merging not squashing to make it clear against which upstream this patch was developed.)
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index ff7c562fba..952604e0db 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2608,7 +2608,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) {
unit_serialize_item(u, f, "assert-result", yes_no(u->assert_result));
unit_serialize_item(u, f, "transient", yes_no(u->transient));
- unit_serialize_item_format(u, f, "cpuacct-usage-base", "%" PRIu64, u->cpuacct_usage_base);
+ unit_serialize_item_format(u, f, "cpu-usage-base", "%" PRIu64, u->cpu_usage_base);
if (u->cgroup_path)
unit_serialize_item(u, f, "cgroup", u->cgroup_path);
@@ -2824,9 +2824,9 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
continue;
- } else if (streq(l, "cpuacct-usage-base")) {
+ } else if (streq(l, "cpu-usage-base") || streq(l, "cpuacct-usage-base")) {
- r = safe_atou64(v, &u->cpuacct_usage_base);
+ r = safe_atou64(v, &u->cpu_usage_base);
if (r < 0)
log_unit_debug(u, "Failed to parse CPU usage %s, ignoring.", v);