]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix message about detected memory hierarchy
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 15 Nov 2017 09:19:45 +0000 (10:19 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 15 Nov 2017 21:58:24 +0000 (22:58 +0100)
Just the error check and message were wrong, otherwise the logic was OK.

src/core/cgroup.c

index 903c275359e8cb5c8c864bc5300bc864362440ce..3c0d22a691fb4b725e634c09341f6855d10dbc6b 100644 (file)
@@ -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);