termux-packages/root-packages/runc/cg-cpuset-noprefix-compat.patch

47 lines
1.8 KiB
Diff

diff -uNr runc-1.0.0-rc8/libcontainer/cgroups/fs/cpuset.go runc-1.0.0-rc8.mod/libcontainer/cgroups/fs/cpuset.go
--- runc-1.0.0-rc8/libcontainer/cgroups/fs/cpuset.go 2019-04-25 00:48:25.000000000 +0300
+++ runc-1.0.0-rc8.mod/libcontainer/cgroups/fs/cpuset.go 2019-07-14 14:25:08.973734249 +0300
@@ -31,12 +31,12 @@
func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error {
if cgroup.Resources.CpusetCpus != "" {
- if err := writeFile(path, "cpuset.cpus", cgroup.Resources.CpusetCpus); err != nil {
+ if err := writeFile(path, "cpus", cgroup.Resources.CpusetCpus); err != nil {
return err
}
}
if cgroup.Resources.CpusetMems != "" {
- if err := writeFile(path, "cpuset.mems", cgroup.Resources.CpusetMems); err != nil {
+ if err := writeFile(path, "mems", cgroup.Resources.CpusetMems); err != nil {
return err
}
}
@@ -88,10 +88,10 @@
}
func (s *CpusetGroup) getSubsystemSettings(parent string) (cpus []byte, mems []byte, err error) {
- if cpus, err = ioutil.ReadFile(filepath.Join(parent, "cpuset.cpus")); err != nil {
+ if cpus, err = ioutil.ReadFile(filepath.Join(parent, "cpus")); err != nil {
return
}
- if mems, err = ioutil.ReadFile(filepath.Join(parent, "cpuset.mems")); err != nil {
+ if mems, err = ioutil.ReadFile(filepath.Join(parent, "mems")); err != nil {
return
}
return cpus, mems, nil
@@ -135,12 +135,12 @@
}
if s.isEmpty(currentCpus) {
- if err := writeFile(current, "cpuset.cpus", string(parentCpus)); err != nil {
+ if err := writeFile(current, "cpus", string(parentCpus)); err != nil {
return err
}
}
if s.isEmpty(currentMems) {
- if err := writeFile(current, "cpuset.mems", string(parentMems)); err != nil {
+ if err := writeFile(current, "mems", string(parentMems)); err != nil {
return err
}
}