From: Zbigniew Jędrzejewski-Szmek Date: Wed, 15 Nov 2017 09:19:45 +0000 (+0100) Subject: core: fix message about detected memory hierarchy X-Git-Tag: v236~200^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4c819ed2311a8334045f0d88924fc2e2f7dcc00;p=thirdparty%2Fsystemd.git core: fix message about detected memory hierarchy Just the error check and message were wrong, otherwise the logic was OK. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 903c275359e..3c0d22a691f 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1978,9 +1978,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);