summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-24 18:48:57 -0500
committerGitHub <noreply@github.com>2017-02-24 18:48:57 -0500
commit78e4f19ebc4c128ec72d732068df5b6f8a0e122d (patch)
tree9c53c3f264abedd041184d107600a41acfce036b /src/core/manager.c
parent13e785f7a0d2c78fbd822b1157ef9d7ee3fef805 (diff)
parent4bb652ac2fe25d4c85072c9f2f610319ac9981ee (diff)
Merge pull request #5444 from poettering/cgroups-revert-no-error
Revert "core: simplify cg_[all_]unified()" and more.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index ea80585329..cff38e28de 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -776,7 +776,10 @@ static int manager_setup_cgroups_agent(Manager *m) {
if (!MANAGER_IS_SYSTEM(m))
return 0;
- if (cg_unified(SYSTEMD_CGROUP_CONTROLLER)) /* We don't need this anymore on the unified hierarchy */
+ r = cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER);
+ if (r < 0)
+ return log_error_errno(r, "Failed to determine whether unified cgroups hierarchy is used: %m");
+ if (r > 0) /* We don't need this anymore on the unified hierarchy */
return 0;
if (m->cgroups_agent_fd < 0) {