summaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-11-06 21:36:18 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-11-07 18:24:02 +0100
commit4e5e9dbec2313b07a4c10ddfd5bc7d23e3fa34f6 (patch)
treee0ef774e9109c3a7fb20f10ad270f8e31e0b723a /pkg/spec
parent581a7ec2984c2c125ff255c9aca62f2547c7d46f (diff)
downloadpodman-4e5e9dbec2313b07a4c10ddfd5bc7d23e3fa34f6.tar.gz
podman-4e5e9dbec2313b07a4c10ddfd5bc7d23e3fa34f6.tar.bz2
podman-4e5e9dbec2313b07a4c10ddfd5bc7d23e3fa34f6.zip
mount: add new options nocopyup|copyup for tmpfs
add a way to disable tmpcopyup for tmpfs. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/spec')
-rw-r--r--pkg/spec/storage.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/spec/storage.go b/pkg/spec/storage.go
index 095534589..e30bdfc67 100644
--- a/pkg/spec/storage.go
+++ b/pkg/spec/storage.go
@@ -514,11 +514,17 @@ func getTmpfsMount(args []string) (spec.Mount, error) {
Source: TypeTmpfs,
}
- var setDest, setRORW, setSuid, setDev, setExec bool
+ var setDest, setRORW, setSuid, setDev, setExec, setTmpcopyup bool
for _, val := range args {
kv := strings.Split(val, "=")
switch kv[0] {
+ case "tmpcopyup", "notmpcopyup":
+ if setTmpcopyup {
+ return newMount, errors.Wrapf(optionArgError, "cannot pass 'tmpcopyup' and 'notmpcopyup' options more than once")
+ }
+ setTmpcopyup = true
+ newMount.Options = append(newMount.Options, kv[0])
case "ro", "rw":
if setRORW {
return newMount, errors.Wrapf(optionArgError, "cannot pass 'ro' and 'rw' options more than once")