Add error check after parseStorageOpt

Signed-off-by: Ken Herner <kherner@progress.com>
This commit is contained in:
Ken Herner 2016-05-12 17:21:38 -04:00
parent e918340431
commit 373654f43e

View file

@ -275,6 +275,9 @@ func (d *Driver) Create(id string, parent string, mountLabel string, storageOpt
func (d *Driver) create(id, parent string, storageOpt map[string]string) error {
name := d.zfsPath(id)
quota, err := parseStorageOpt(storageOpt)
if err != nil {
return err
}
if parent == "" {
mountoptions := map[string]string{"mountpoint": "legacy"}
fs, err := zfs.CreateFilesystem(name, mountoptions)