mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-12 00:47:40 +00:00
Special case memory-swap=-1
We document that memory-swap==-1 means unlimited, but currently we won't allow the user to specify the -1 value. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
537352cc3e
commit
100d2fdcfd
1 changed files with 7 additions and 3 deletions
|
|
@ -309,9 +309,13 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod.
|
|||
}
|
||||
}
|
||||
if c.String("memory-swap") != "" {
|
||||
memorySwap, err = units.RAMInBytes(c.String("memory-swap"))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid value for memory-swap")
|
||||
if c.String("memory-swap") == "-1" {
|
||||
memorySwap = -1
|
||||
} else {
|
||||
memorySwap, err = units.RAMInBytes(c.String("memory-swap"))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid value for memory-swap")
|
||||
}
|
||||
}
|
||||
}
|
||||
if c.String("kernel-memory") != "" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue