summaryrefslogtreecommitdiff
path: root/cmd/podman/common/specgen.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-04-21 08:22:05 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-04-21 16:02:11 -0400
commit592e7867a3fc2fa370f7f24125285e81fb0c6d1a (patch)
treeea306a2c931c898366039d4181f208c89c361dfc /cmd/podman/common/specgen.go
parent9d7b5947b9ff661433c4bedc018f5368830abbe6 (diff)
downloadpodman-592e7867a3fc2fa370f7f24125285e81fb0c6d1a.tar.gz
podman-592e7867a3fc2fa370f7f24125285e81fb0c6d1a.tar.bz2
podman-592e7867a3fc2fa370f7f24125285e81fb0c6d1a.zip
Add support for devices from command line
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r--cmd/podman/common/specgen.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index e8e889e66..7818c628d 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -561,14 +561,9 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
//s.Mounts = c.Mount
s.VolumesFrom = c.VolumesFrom
- // TODO any idea why this was done
- //devices := rtc.Containers.Devices
- // TODO conflict on populate?
- //
- //if c.Changed("device") {
- // devices = append(devices, c.StringSlice("device")...)
- //}
-
+ for _, dev := range c.Devices {
+ s.Devices = append(s.Devices, specs.LinuxDevice{Path: dev})
+ }
// TODO things i cannot find in spec
// we dont think these are in the spec
// init - initbinary