Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
goto ERROR;
}
+ // Enable accounting to collect stats
+ r = pakfire_cgroup_enable_accounting(build->cgroup);
+ if (r < 0) {
+ switch (-r) {
+ case ENOTSUP:
+ DEBUG(build->ctx, "Could not enable accounting in cgroup\n");
+ break;
+
+ default:
+ goto ERROR;
+ }
+ }
+
// Fetch config
config = pakfire_get_config(build->pakfire);
if (!config)
// Fetch our UUID
const char* uuid = pakfire_jail_uuid(jail);
- // Enable accounting to collect stats
- r = pakfire_cgroup_enable_accounting(jail->cgroup);
- if (r < 0) {
- switch (-r) {
- case ENOTSUP:
- DEBUG(jail->ctx, "Could not enable accounting in cgroup\n");
- break;
-
- default:
- goto ERROR;
- }
- }
-
// Create a temporary cgroup
r = pakfire_cgroup_child(&ctx.cgroup, jail->cgroup, uuid, 0);
if (r < 0) {