make fstype be composed of "fuse" and subtype (#77)

fix #76
geesefs-0-30-9
kungf 2020-03-11 16:51:26 +08:00 committed by GitHub
parent 2f65426467
commit 7d791d27a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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 {