summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go2
-rw-r--r--cmd/podman/common/create_opts.go2
-rw-r--r--cmd/podman/common/specgen.go11
3 files changed, 5 insertions, 10 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index f4c7059d1..bdf762ed7 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -125,7 +125,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"Override the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-cf`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`",
)
createFlags.StringSliceVar(
- &cf.Device,
+ &cf.Devices,
"device", containerConfig.Devices(),
fmt.Sprintf("Add a host device to the container"),
)
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 37fe01460..2f08bb6a6 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -25,7 +25,7 @@ type ContainerCLIOpts struct {
CPUSetMems string
Detach bool
DetachKeys string
- Device []string
+ Devices []string
DeviceCGroupRule []string
DeviceReadBPs []string
DeviceReadIOPs []string
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