Skip to content

Commit

Permalink
Fix incorrect use of OCI runtime specs-go cgroup dev types
Browse files Browse the repository at this point in the history
Not sure why prior Go versions allowed this, but Go 1.10 caught the
Sprintf type mismatches.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
  • Loading branch information
estesp committed Mar 8, 2018
1 parent bf7d89f commit 5539584
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ func (d *devicesController) Update(path string, resources *specs.LinuxResources)
}

func deviceString(device specs.LinuxDeviceCgroup) string {
return fmt.Sprintf("%c %s:%s %s",
&device.Type,
return fmt.Sprintf("%s %s:%s %s",
device.Type,
deviceNumber(device.Major),
deviceNumber(device.Minor),
&device.Access,
device.Access,
)
}

Expand Down

0 comments on commit 5539584

Please sign in to comment.