mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
volume/local: make setOpts() a method of localVolume
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
b56fc2d0f8
commit
a77b90c35e
3 changed files with 3 additions and 3 deletions
|
@ -173,7 +173,7 @@ func (r *Root) Create(name string, opts map[string]string) (volume.Volume, error
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(opts) != 0 {
|
if len(opts) != 0 {
|
||||||
if err = setOpts(v, opts); err != nil {
|
if err = v.setOpts(opts); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
var b []byte
|
var b []byte
|
||||||
|
|
|
@ -47,7 +47,7 @@ func (o *optsConfig) String() string {
|
||||||
return fmt.Sprintf("type='%s' device='%s' o='%s' size='%d'", o.MountType, o.MountDevice, o.MountOpts, o.Quota.Size)
|
return fmt.Sprintf("type='%s' device='%s' o='%s' size='%d'", o.MountType, o.MountDevice, o.MountOpts, o.Quota.Size)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setOpts(v *localVolume, opts map[string]string) error {
|
func (v *localVolume) setOpts(opts map[string]string) error {
|
||||||
if len(opts) == 0 {
|
if len(opts) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
type optsConfig struct{}
|
type optsConfig struct{}
|
||||||
|
|
||||||
func setOpts(v *localVolume, opts map[string]string) error {
|
func (v *localVolume) setOpts(opts map[string]string) error {
|
||||||
if len(opts) > 0 {
|
if len(opts) > 0 {
|
||||||
return errdefs.InvalidParameter(errors.New("options are not supported on this platform"))
|
return errdefs.InvalidParameter(errors.New("options are not supported on this platform"))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue