Change mount.Interface.Mount to exec('mount'), instead of syscall

This commit is contained in:
Deyuan Deng
2015-04-02 21:08:04 -04:00
committed by Deyuan Deng
parent 8fa21ebd62
commit 6897095e56
20 changed files with 188 additions and 238 deletions

View File

@@ -38,13 +38,13 @@ func (f *FakeMounter) ResetLog() {
f.Log = []FakeAction{}
}
func (f *FakeMounter) Mount(source string, target string, fstype string, flags uintptr, data string) error {
func (f *FakeMounter) Mount(source string, target string, fstype string, options []string) error {
f.MountPoints = append(f.MountPoints, MountPoint{Device: source, Path: target, Type: fstype})
f.Log = append(f.Log, FakeAction{Action: FakeActionMount, Target: target, Source: source, FSType: fstype})
return nil
}
func (f *FakeMounter) Unmount(target string, flags int) error {
func (f *FakeMounter) Unmount(target string) error {
newMountpoints := []MountPoint{}
for _, mp := range f.MountPoints {
if mp.Path != target {