fix: return error with fewer mount options on Windows

This commit is contained in:
andyzhangx 2020-08-15 14:16:42 +00:00 committed by Srini Brahmaroutu
parent 89fac93b43
commit 6f59f9db45

View File

@ -84,9 +84,8 @@ func (mounter *Mounter) MountSensitive(source string, target string, fstype stri
allOptions = append(allOptions, options...) allOptions = append(allOptions, options...)
allOptions = append(allOptions, sensitiveOptions...) allOptions = append(allOptions, sensitiveOptions...)
if len(allOptions) < 2 { if len(allOptions) < 2 {
klog.Warningf("mount options(%q) command number(%d) less than 2, source:%q, target:%q, skip mounting", return fmt.Errorf("mount options(%q) should have at least 2 options, current number:%d, source:%q, target:%q",
sanitizedOptionsForLogging, len(allOptions), source, target) sanitizedOptionsForLogging, len(allOptions), source, target)
return nil
} }
// currently only cifs mount is supported // currently only cifs mount is supported