Skip to content

Commit

Permalink
Merge pull request #51 from containerd/type
Browse files Browse the repository at this point in the history
Fix empty device type
  • Loading branch information
dmcgowan committed Aug 13, 2018
2 parents 5e61083 + 0f3de2f commit 2e2922e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ func (d *devicesController) Create(path string, resources *specs.LinuxResources)
if device.Allow {
file = allowDeviceFile
}
if device.Type == "" {
device.Type = "a"
}
if err := ioutil.WriteFile(
filepath.Join(d.Path(path), file),
[]byte(deviceString(device)),
Expand Down

0 comments on commit 2e2922e

Please sign in to comment.