#include "cgroup-util.h"
#include "log.h"
#include "strv.h"
+#include "path-util.h"
int cgroup_bonding_realize(CGroupBonding *b) {
int r;
assert(pid >= 0);
if (cgroup_suffix) {
- p = join(b->path, "/", cgroup_suffix, NULL);
+ p = strjoin(b->path, "/", cgroup_suffix, NULL);
if (!p)
return -ENOMEM;
return 0;
if (cgroup_suffix) {
- p = join(b->path, "/", cgroup_suffix, NULL);
+ p = strjoin(b->path, "/", cgroup_suffix, NULL);
if (!p)
return -ENOMEM;
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());
/* 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;
}
}