Commit d31db957 authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher Committed by Han-Wen Nienhuys

fuse: allow setting the fsname (first column in df -T)

parent c3d1a136
......@@ -53,8 +53,10 @@ type MountOptions struct {
// This may be useful for NFS.
RememberInodes bool
// The name will show up on the output of the mount. Keep this string
// small.
// Values shown in "df -T" and friends
// First column, "Filesystem"
FsName string
// Second column, "Type", will be shown as "fuse." + Name
Name string
// If set, wrap the file system in a single-threaded locking wrapper.
......
......@@ -165,6 +165,11 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
}
optStrs = append(optStrs, "subtype="+name)
fsname := opts.FsName
if len(fsname) > 0 {
optStrs = append(optStrs, "fsname="+fsname)
}
mountPoint = filepath.Clean(mountPoint)
if !filepath.IsAbs(mountPoint) {
cwd, err := os.Getwd()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment