oci.getDevices(): move "non-dir, non '/dev/console'" case into switch
This makes it slightly clearer that these are all part of the same logic. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
95b83fa54f
commit
7f70ff9672
@ -81,7 +81,7 @@ func getDevices(path, containerPath string) ([]specs.LinuxDevice, error) {
|
||||
}
|
||||
case f.Name() == "console":
|
||||
continue
|
||||
}
|
||||
default:
|
||||
device, err := DeviceFromPath(filepath.Join(path, f.Name()))
|
||||
if err != nil {
|
||||
if err == ErrNotADevice {
|
||||
@ -100,6 +100,7 @@ func getDevices(path, containerPath string) ([]specs.LinuxDevice, error) {
|
||||
}
|
||||
out = append(out, *device)
|
||||
}
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user