summaryrefslogtreecommitdiff
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-15 10:19:45 +0100
committerSven Eden <yamakuzure@gmx.net>2017-11-15 10:19:45 +0100
commitd8072baf33526092d0b94a0a1a3b8246a1a514e7 (patch)
treef7d5664fae70b7259bd094f9c835656b36a8bbfd /src/core/cgroup.c
parent143c99acf184c434c045d78d1a4f91f3bb1267db (diff)
core: fix message about detected memory hierarchy
Just the error check and message were wrong, otherwise the logic was OK.
Diffstat (limited to 'src/core/cgroup.c')
-rw-r--r--src/core/cgroup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 656644828..413f18002 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1991,9 +1991,9 @@ int manager_setup_cgroup(Manager *m) {
return log_error_errno(r, "Couldn't determine if we are running in the unified hierarchy: %m");
all_unified = cg_all_unified();
- if (r < 0)
- return log_error_errno(r, "Couldn't determine whether we are in all unified mode: %m");
- if (r > 0)
+ if (all_unified < 0)
+ return log_error_errno(all_unified, "Couldn't determine whether we are in all unified mode: %m");
+ if (all_unified > 0)
log_debug("Unified cgroup hierarchy is located at %s.", path);
else {
r = cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER);