From 7d791d27a25d76da9282d7b393dd211ae4821afc Mon Sep 17 00:00:00 2001 From: kungf Date: Wed, 11 Mar 2020 16:51:26 +0800 Subject: [PATCH] make fstype be composed of "fuse" and subtype (#77) fix #76 --- mount_linux.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mount_linux.go b/mount_linux.go index ce83d9f..58dd39c 100644 --- a/mount_linux.go +++ b/mount_linux.go @@ -149,11 +149,16 @@ func directmount(dir string, cfg *MountConfig) (*os.File, error) { delete(opts, k) } delete(opts, "fsname") // handled via fstype mount(2) parameter + fstype := "fuse" + if subtype, ok := opts["subtype"]; ok { + fstype += "." + subtype + } + delete(opts, "subtype") data += "," + mapToOptionsString(opts) if err := unix.Mount( cfg.FSName, // source dir, // target - "fuse", // fstype + fstype, // fstype mountflag, // mountflag data, // data ); err != nil {