int ret;
bool ok = false;
- if (!mp->need_cpuset_init)
- return true;
-
childfile = cgroup_to_absolute_path(mp, path, name);
if (!childfile)
return false;
goto out;
}
ok = (lxc_write_to_file(childfile, value, strlen(value), false) >= 0);
-
-out:
if (!ok)
SYSERROR("failed writing %s", childfile);
+
+out:
if (parentfile)
free(parentfile);
free(childfile);
(const char **)mp->hierarchy->subsystems))
return true;
+ if (!mp->need_cpuset_init)
+ return true;
+
return (do_init_cpuset_file(mp, path, "/cpuset.cpus") &&
do_init_cpuset_file(mp, path, "/cpuset.mems") );
}