chiark / gitweb /
core: move ManagerRunningAs to shared
[elogind.git] / src / core / cgroup.c
index 1322f63eeef3647c9f361b6b597c0025a818d7d6..8fc1731485986c08f184b6e0dbca2c03bcfc27fe 100644 (file)
@@ -313,7 +313,7 @@ int manager_setup_cgroup(Manager *m) {
                 goto finish;
         }
 
-        if (m->running_as == MANAGER_SYSTEM)
+        if (m->running_as == SYSTEMD_SYSTEM)
                 strcpy(suffix, "/system");
         else {
                 snprintf(suffix, sizeof(suffix), "/systemd-%lu", (unsigned long) getpid());
@@ -330,8 +330,7 @@ int manager_setup_cgroup(Manager *m) {
                 /* We need a new root cgroup */
                 m->cgroup_hierarchy = NULL;
                 if (asprintf(&m->cgroup_hierarchy, "%s%s", streq(current, "/") ? "" : current, suffix) < 0) {
-                        log_error("Out of memory.");
-                        r = -ENOMEM;
+                        r = log_oom();
                         goto finish;
                 }
         }