We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 529d676 commit 60dc4e1Copy full SHA for 60dc4e1
1 file changed
generate/generate.go
@@ -918,6 +918,16 @@ func (g *Generator) RemoveLinuxNamespace(ns string) error {
918
func (g *Generator) AddDevice(device rspec.Device) {
919
g.initSpecLinux()
920
921
+ for i, dev := range g.spec.Linux.Devices {
922
+ if dev.Path == device.Path {
923
+ g.spec.Linux.Devices[i] = device
924
+ return
925
+ }
926
+ if dev.Type == device.Type && dev.Major == device.Major && dev.Minor == device.Minor {
927
+ fmt.Println("WARNING: The same type, major and minor should not be used for multiple devices.")
928
929
930
+
931
g.spec.Linux.Devices = append(g.spec.Linux.Devices, device)
932
}
933
0 commit comments