return -1;
}
- for (i = 0; i < VIR_CGROUP_BACKEND_TYPE_LAST; i++) {
- if (group->backends[i]) {
- int rc = group->backends[i]->detectControllers(group, controllers, parent);
- if (rc < 0)
- return -1;
- controllersAvailable |= rc;
- }
- }
-
- /* Check that at least 1 controller is available */
- if (controllersAvailable == 0) {
- virReportSystemError(ENXIO, "%s",
- _("At least one cgroup controller is required"));
- return -1;
- }
-
/* In some cases we can copy part of the placement info
* based on the parent cgroup...
*/
}
}
+ for (i = 0; i < VIR_CGROUP_BACKEND_TYPE_LAST; i++) {
+ if (group->backends[i]) {
+ int rc = group->backends[i]->detectControllers(group, controllers, parent);
+ if (rc < 0)
+ return -1;
+ controllersAvailable |= rc;
+ }
+ }
+
+ /* Check that at least 1 controller is available */
+ if (controllersAvailable == 0) {
+ virReportSystemError(ENXIO, "%s",
+ _("At least one cgroup controller is required"));
+ return -1;
+ }
+
return 0;
}
char **contList = NULL;
char **tmp;
- if (virAsprintf(&contFile, "%s/cgroup.controllers",
- group->unified.mountPoint) < 0)
+ if (virAsprintf(&contFile, "%s%s/cgroup.controllers",
+ group->unified.mountPoint,
+ NULLSTR_EMPTY(group->unified.placement)) < 0)
return -1;
rc = virFileReadAll(contFile, 1024 * 1024, &contStr);