chiark / gitweb /
Prep v233: Add missing updates from upstream in src/login
[elogind.git] / src / login / elogind.c
index 5ff9ed7f2139c73c3b8e06b5f2fdc32a53949a71..57d6fe433f9e42c7ebee70276a010836cf8e1720 100644 (file)
@@ -145,7 +145,10 @@ int elogind_setup_cgroups_agent(Manager *m) {
         if (!MANAGER_IS_SYSTEM(m))
                 return 0;
 
-        if (cg_unified() > 0) /* 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) {