summaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-14 15:44:44 +0200
committerGitHub <noreply@github.com>2019-06-14 15:44:44 +0200
commit0ea95da7b9fcbcbe7e4ebab78f2950972c70ba68 (patch)
tree94f1f158a2bdbeecc0fe5a41b7f8474b657253a9 /pkg/util
parentd5f04e920bf0cca02c9efe25ceca7639cbf31644 (diff)
parent23efe4cb819b9fb306155ab25db7e2459aba63bb (diff)
downloadpodman-0ea95da7b9fcbcbe7e4ebab78f2950972c70ba68.tar.gz
podman-0ea95da7b9fcbcbe7e4ebab78f2950972c70ba68.tar.bz2
podman-0ea95da7b9fcbcbe7e4ebab78f2950972c70ba68.zip
Merge pull request #3315 from giuseppe/support-bind-nonrecursive
storage: support --mount type=bind,bind-nonrecursive
Diffstat (limited to 'pkg/util')
-rw-r--r--pkg/util/mountOpts.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkg/util/mountOpts.go b/pkg/util/mountOpts.go
index 59459807c..489e7eeef 100644
--- a/pkg/util/mountOpts.go
+++ b/pkg/util/mountOpts.go
@@ -17,10 +17,19 @@ var (
// sensible and follow convention.
func ProcessOptions(options []string) []string {
var (
- foundrw, foundro bool
- rootProp string
+ foundbind, foundrw, foundro bool
+ rootProp string
)
- options = append(options, "rbind")
+ 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":