chiark / gitweb /
unit-printf: add specifiers for the host name, machine id, boot id
[elogind.git] / src / core / cgroup.c
index 5513f6560c26be9e74d68ac2e5a8a548cd564d45..8ddb1118ed8645b4455367a00629ccd78cfc6b49 100644 (file)
@@ -120,7 +120,7 @@ int cgroup_bonding_install(CGroupBonding *b, pid_t pid, const char *cgroup_suffi
         assert(pid >= 0);
 
         if (cgroup_suffix) {
-                p = join(b->path, "/", cgroup_suffix, NULL);
+                p = strjoin(b->path, "/", cgroup_suffix, NULL);
                 if (!p)
                         return -ENOMEM;
 
@@ -208,7 +208,7 @@ int cgroup_bonding_kill(CGroupBonding *b, int sig, bool sigcont, bool rem, Set *
                 return 0;
 
         if (cgroup_suffix) {
-                p = join(b->path, "/", cgroup_suffix, NULL);
+                p = strjoin(b->path, "/", cgroup_suffix, NULL);
                 if (!p)
                         return -ENOMEM;
 
@@ -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;
                 }
         }