Skip to content

Commit

Permalink
Merge pull request #34 from inevity/mountsubtype
Browse files Browse the repository at this point in the history
add fuse mount subtype to mountconfig
  • Loading branch information
jacobsa authored Nov 3, 2017
2 parents 1ab97fb + eba79bc commit 88e3bc5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mount_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"] = ""
Expand Down

0 comments on commit 88e3bc5

Please sign in to comment.