* Ignore ro mount options in btrfs and windows drivers

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2019-08-09 20:44:40 +02:00
parent 4b91f60e89
commit 2e80400683
6 changed files with 23 additions and 5 deletions

View File

@@ -372,7 +372,15 @@ func (d *Driver) Get(id string, options graphdriver.MountOpts) (string, error) {
logrus.Debugf("WindowsGraphDriver Get() id %s mountLabel %s", id, options.MountLabel)
var dir string
if len(options.Options) > 0 {
switch len(options.Options) {
case 0:
case 1:
if options.Options[0] == "ro" {
// ignore "ro" option
break
}
fallthrough
default:
return "", fmt.Errorf("windows driver does not support mount options")
}
rID, err := d.resolveID(id)