aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorJason Ertel <jertel@users.noreply.github.com>2022-08-30 14:12:01 -0400
committerGitHub <noreply@github.com>2022-08-30 14:12:01 -0400
commit368fa6074da72f4215b5fc5a5be974f17b45298d (patch)
treea3063c6bcd4c42255bfe2ee54c94611dd376b4f1 /pkg
parent0e53c8c73509e666bbb5ff4ba0ec2a8fa5c8c1b8 (diff)
parent57441b4c7127b30d9327cb4dfa189c8b9fc33ac5 (diff)
downloadpodman-368fa6074da72f4215b5fc5a5be974f17b45298d.tar.gz
podman-368fa6074da72f4215b5fc5a5be974f17b45298d.tar.bz2
podman-368fa6074da72f4215b5fc5a5be974f17b45298d.zip
Merge branch 'containers:main' into api_compat_containers
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgenutil/specgen.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go
index 8c2c59fed..d0e09fe72 100644
--- a/pkg/specgenutil/specgen.go
+++ b/pkg/specgenutil/specgen.go
@@ -20,7 +20,6 @@ import (
"github.com/containers/podman/v4/pkg/specgen"
systemdDefine "github.com/containers/podman/v4/pkg/systemd/define"
"github.com/containers/podman/v4/pkg/util"
- "github.com/docker/docker/opts"
"github.com/docker/go-units"
"github.com/opencontainers/runtime-spec/specs-go"
)
@@ -461,11 +460,12 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions
// SHM Size
if c.ShmSize != "" {
- var m opts.MemBytes
- if err := m.Set(c.ShmSize); err != nil {
+ val, err := units.RAMInBytes(c.ShmSize)
+
+ if err != nil {
return fmt.Errorf("unable to translate --shm-size: %w", err)
}
- val := m.Value()
+
s.ShmSize = &val
}