diff options
Diffstat (limited to 'weed/mount/unmount/unmount_std.go')
| -rw-r--r-- | weed/mount/unmount/unmount_std.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/weed/mount/unmount/unmount_std.go b/weed/mount/unmount/unmount_std.go new file mode 100644 index 000000000..76267fb6a --- /dev/null +++ b/weed/mount/unmount/unmount_std.go @@ -0,0 +1,18 @@ +//go:build !linux +// +build !linux + +package unmount + +import ( + "os" + "syscall" +) + +func unmount(dir string) error { + err := syscall.Unmount(dir, 0) + if err != nil { + err = &os.PathError{Op: "unmount", Path: dir, Err: err} + return err + } + return nil +} |
