diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-19 20:16:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 20:16:08 +0200 |
commit | 4d470c73ca9f441ced162431270977b967b547a1 (patch) | |
tree | da74a6afa305e077cb366df876ec9ea7bd79d28b /pkg/util/mountOpts.go | |
parent | 360adac37443bdf50959e19e2e5a7e7608348249 (diff) | |
parent | 30f24bb76051f403c662ef4a317b50dd1b3b045a (diff) | |
download | podman-4d470c73ca9f441ced162431270977b967b547a1.tar.gz podman-4d470c73ca9f441ced162431270977b967b547a1.tar.bz2 podman-4d470c73ca9f441ced162431270977b967b547a1.zip |
Merge pull request #3369 from mheon/add_cached_delegated
Add support for cached, delegated mounts
Diffstat (limited to 'pkg/util/mountOpts.go')
-rw-r--r-- | pkg/util/mountOpts.go | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go index 489e7eeef..40c99384d 100644 --- a/pkg/util/mountOpts.go +++ b/pkg/util/mountOpts.go @@ -20,26 +20,22 @@ func ProcessOptions(options []string) []string { foundbind, foundrw, foundro bool rootProp string ) + for _, opt := range options { switch opt { case "bind", "rbind": foundbind = true - break - } - } - if !foundbind { - options = append(options, "rbind") - } - for _, opt := range options { - switch opt { - case "rw": - foundrw = true case "ro": foundro = true + case "rw": + foundrw = true case "private", "rprivate", "slave", "rslave", "shared", "rshared": rootProp = opt } } + if !foundbind { + options = append(options, "rbind") + } if !foundrw && !foundro { options = append(options, "rw") } |