termux-packages/root-packages/lxc/src-lxc-cgroups-cgfsng.c.patch
2022-04-18 14:31:14 +05:30

51 lines
1.6 KiB
Diff

diff -uNr lxc-3.2.1/src/lxc/cgroups/cgfsng.c lxc-3.2.1.mod/src/lxc/cgroups/cgfsng.c
--- lxc-3.2.1/src/lxc/cgroups/cgfsng.c 2019-07-23 01:34:33.000000000 +0300
+++ lxc-3.2.1.mod/src/lxc/cgroups/cgfsng.c 2019-09-19 16:28:18.220151406 +0300
@@ -403,7 +403,7 @@
}
oldv = *lastslash;
*lastslash = '\0';
- fpath = must_make_path(path, "cpuset.cpus", NULL);
+ fpath = must_make_path(path, "cpus", NULL);
*lastslash = oldv;
posscpus = read_file(fpath);
if (!posscpus) {
@@ -509,7 +509,7 @@
copy_parent:
if (!am_initialized) {
- fpath = must_make_path(path, "cpuset.cpus", NULL);
+ fpath = must_make_path(path, "cpus", NULL);
ret = lxc_write_to_file(fpath, cpulist, strlen(cpulist), false,
0666);
if (ret < 0) {
@@ -605,7 +605,7 @@
return false;
}
- /* Make sure any isolated cpus are removed from cpuset.cpus. */
+ /* Make sure any isolated cpus are removed from cpus. */
if (!cg_legacy_filter_and_set_cpus(cgpath, v == '1')) {
SYSERROR("Failed to remove isolated cpus");
return false;
@@ -616,8 +616,8 @@
TRACE("\"cgroup.clone_children\" was already set to \"1\"");
/* copy parent's settings */
- if (!copy_parent_file(cgpath, "cpuset.mems")) {
- SYSERROR("Failed to copy \"cpuset.mems\" settings");
+ if (!copy_parent_file(cgpath, "mems")) {
+ SYSERROR("Failed to copy \"mems\" settings");
return false;
}
@@ -731,7 +731,7 @@
* verify /sys/fs/cgroup/ in this field.
*/
if (strncmp(p, "/sys/fs/cgroup/", 15) != 0) {
- ERROR("Found hierarchy not under /sys/fs/cgroup: \"%s\"", p);
+ WARN("Found hierarchy not under /sys/fs/cgroup: \"%s\"", p);
return NULL;
}