X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fcgroup.c;h=8fc1731485986c08f184b6e0dbca2c03bcfc27fe;hp=aaea96b820a595069e26d96195d9a2b0785a63ec;hb=67445f4e22ad924394acdd4fd49e6f238244a5ca;hpb=b7def684941808600c344f0be7a2b9fcdda97e0f diff --git a/src/core/cgroup.c b/src/core/cgroup.c index aaea96b82..8fc173148 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -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; } }