X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Felogind.c;h=57d6fe433f9e42c7ebee70276a010836cf8e1720;hb=243f760626232036dda3483f94152cc5ae63a1a1;hp=5da9ae6a2d7536462726c7cd7469ff9741a35b48;hpb=f5eb2a086bc5d5d36bc2e4755a1d6b508e202250;p=elogind.git diff --git a/src/login/elogind.c b/src/login/elogind.c index 5da9ae6a2..57d6fe433 100644 --- a/src/login/elogind.c +++ b/src/login/elogind.c @@ -145,7 +145,10 @@ int elogind_setup_cgroups_agent(Manager *m) { if (!MANAGER_IS_SYSTEM(m)) return 0; - if (cg_unified(SYSTEMD_CGROUP_CONTROLLER) > 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) {