summaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/containerd/cgroups/cpuset.go
diff options
context:
space:
mode:
authorLantao Liu <lantaol@google.com>2019-05-10 18:27:49 -0700
committerIan Lewis <ianlewis@google.com>2019-05-11 10:27:49 +0900
commit97875daf63d03cda6ff3c4f393a004a8295a748e (patch)
tree30dce772c1d7bb9d77fab8b224675630e3c10b2d /vendor/github.com/containerd/cgroups/cpuset.go
parent14f1de4a45daa75ef016fabb56d86cbd9b902504 (diff)
Port shim fix (#27)
Port shim fixes containerd/containerd#3264, containerd/containerd#3264 Update containerd to newest release/1.2 commit.
Diffstat (limited to 'vendor/github.com/containerd/cgroups/cpuset.go')
-rw-r--r--vendor/github.com/containerd/cgroups/cpuset.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/containerd/cgroups/cpuset.go b/vendor/github.com/containerd/cgroups/cpuset.go
index f182aa68c..30208515e 100644
--- a/vendor/github.com/containerd/cgroups/cpuset.go
+++ b/vendor/github.com/containerd/cgroups/cpuset.go
@@ -57,21 +57,21 @@ func (c *cpusetController) Create(path string, resources *specs.LinuxResources)
if resources.CPU != nil {
for _, t := range []struct {
name string
- value *string
+ value string
}{
{
name: "cpus",
- value: &resources.CPU.Cpus,
+ value: resources.CPU.Cpus,
},
{
name: "mems",
- value: &resources.CPU.Mems,
+ value: resources.CPU.Mems,
},
} {
- if t.value != nil {
+ if t.value != "" {
if err := ioutil.WriteFile(
filepath.Join(c.Path(path), fmt.Sprintf("cpuset.%s", t.name)),
- []byte(*t.value),
+ []byte(t.value),
defaultFilePerm,
); err != nil {
return err