Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f3de2f

Browse files
committed
Fix empty device type
Signed-off-by: Michael Crosby <[email protected]>
1 parent 5e61083 commit 0f3de2f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

devices.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ func (d *devicesController) Create(path string, resources *specs.LinuxResources)
5858
if device.Allow {
5959
file = allowDeviceFile
6060
}
61+
if device.Type == "" {
62+
device.Type = "a"
63+
}
6164
if err := ioutil.WriteFile(
6265
filepath.Join(d.Path(path), file),
6366
[]byte(deviceString(device)),

0 commit comments

Comments
 (0)