Merge pull request #34 from inevity/mountsubtype

add fuse mount subtype to mountconfig
geesefs-0-30-9
Aaron Jacobs 2017-11-03 15:29:20 +11:00 committed by GitHub
commit 88e3bc5ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -142,6 +142,11 @@ type MountConfig struct {
// For expert use only! May invalidate other guarantees made in the
// documentation for this package.
Options map[string]string
// Sets the filesystem type (third field in /etc/mtab). /etc/mtab and
// /proc/mounts will show the filesystem type as fuse.<Subtype>.
// If not set, /proc/mounts will show the filesystem type as fuse/fuseblk.
Subtype string
}
// Create a map containing all of the key=value mount options to be given to
@ -173,6 +178,11 @@ func (c *MountConfig) toMap() (opts map[string]string) {
opts["fsname"] = fsname
}
subtype := c.Subtype
if subtype != "" {
opts["subtype"] = subtype
}
// Read only?
if c.ReadOnly {
opts["ro"] = ""