From 613d33ff4d6ad8b8990d6fc68f8ccbc55ec12d26 Mon Sep 17 00:00:00 2001 From: Yannick Ulrich Date: Thu, 23 Mar 2023 15:20:31 +0000 Subject: [PATCH] Follow-up to 84c7a33: added unmount.go --- internal/fusefs/unmount.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/fusefs/unmount.go diff --git a/internal/fusefs/unmount.go b/internal/fusefs/unmount.go new file mode 100644 index 0000000..99f9aa6 --- /dev/null +++ b/internal/fusefs/unmount.go @@ -0,0 +1,15 @@ +package fusefs + +import ( + _ "unsafe" + "github.com/hanwen/go-fuse/v2/fuse" +) + +func Unmount(mountPoint string) error { + return unmount(mountPoint, &fuse.MountOptions{DirectMount: false}) +} + +// Unfortunately, the FUSE library does not export its unmount function, +// so this is required until that changes +//go:linkname unmount github.com/hanwen/go-fuse/v2/fuse.unmount +func unmount(mountPoint string, opts *fuse.MountOptions) error