h->fullcgpath = NULL;
}
-/*
- * Try to create the same cgroup in all hierarchies.
- * Start with cgroup_pattern; next cgroup_pattern-1, -2, ..., -999
+/* Try to create the same cgroup in all hierarchies. Start with cgroup_pattern;
+ * next cgroup_pattern-1, -2, ..., -999.
*/
static inline bool cgfsng_create(void *hdata)
{
ERROR("Too many conflicting cgroup names");
goto out_free;
}
+
if (idx) {
int ret;
}
}
}
+
for (i = 0; hierarchies[i]; i++) {
if (!create_path_for_hierarchy(hierarchies[i], container_cgroup)) {
int j;
- ERROR("Failed to create \"%s\"", hierarchies[i]->fullcgpath);
+ ERROR("Failed to create cgroup \"%s\"", hierarchies[i]->fullcgpath);
free(hierarchies[i]->fullcgpath);
hierarchies[i]->fullcgpath = NULL;
for (j = 0; j < i; j++)
goto again;
}
}
- /* Done */
+
d->container_cgroup = container_cgroup;
+
return true;
out_free:
free(container_cgroup);
+
return false;
}