Ignore ro mount options in btrfs and windows drivers
Since now we always set the "ro" mount option, we need to ignore these options on drivers that do not support them. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
1e89a4b923
commit
a32ed165f4
|
|
@ -645,7 +645,15 @@ func (d *Driver) Get(id string, options graphdriver.MountOpts) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
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("btrfs driver does not support mount options")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue