Skip to content

Commit

Permalink
Fix empty device type
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
  • Loading branch information
crosbymichael committed Aug 13, 2018
1 parent 5e61083 commit 0f3de2f
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 0f3de2f

Please sign in to comment.