aboutsummaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-07 21:23:54 +0100
committerGitHub <noreply@github.com>2019-11-07 21:23:54 +0100
commit3ec9ee090e18e79c20e6f76274ce582b656be91c (patch)
tree1303b9a5a2bb414fb5e8470fdcff4839ab7062df /pkg/spec
parentd919961f621d0b9eb70b971fc8e8915ee279ab60 (diff)
parent4e5e9dbec2313b07a4c10ddfd5bc7d23e3fa34f6 (diff)
downloadpodman-3ec9ee090e18e79c20e6f76274ce582b656be91c.tar.gz
podman-3ec9ee090e18e79c20e6f76274ce582b656be91c.tar.bz2
podman-3ec9ee090e18e79c20e6f76274ce582b656be91c.zip
Merge pull request #4466 from giuseppe/notmpcopyup
mount: add new options nocopyup|copyup for tmpfs
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")