Eliminate double call to parseOptions() from Mount()
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
| ... | ... |
@@ -102,13 +102,13 @@ func Mounted(mountpoint string) (bool, error) {
|
| 102 | 102 |
// specified like the mount or fstab unix commands: "opt1=val1,opt2=val2". See |
| 103 | 103 |
// flags.go for supported option flags. |
| 104 | 104 |
func Mount(device, target, mType, options string) error {
|
| 105 |
- flag, _ := parseOptions(options) |
|
| 105 |
+ flag, data := parseOptions(options) |
|
| 106 | 106 |
if flag&REMOUNT != REMOUNT {
|
| 107 | 107 |
if mounted, err := Mounted(target); err != nil || mounted {
|
| 108 | 108 |
return err |
| 109 | 109 |
} |
| 110 | 110 |
} |
| 111 |
- return ForceMount(device, target, mType, options) |
|
| 111 |
+ return mount(device, target, mType, uintptr(flag), data) |
|
| 112 | 112 |
} |
| 113 | 113 |
|
| 114 | 114 |
// ForceMount will mount a filesystem according to the specified configuration, |