Skip to content

Commit 88e3bc5

Browse files
authored
Merge pull request #34 from inevity/mountsubtype
add fuse mount subtype to mountconfig
2 parents 1ab97fb + eba79bc commit 88e3bc5

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

mount_config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ type MountConfig struct {
142142
// For expert use only! May invalidate other guarantees made in the
143143
// documentation for this package.
144144
Options map[string]string
145+
146+
// Sets the filesystem type (third field in /etc/mtab). /etc/mtab and
147+
// /proc/mounts will show the filesystem type as fuse.<Subtype>.
148+
// If not set, /proc/mounts will show the filesystem type as fuse/fuseblk.
149+
Subtype string
145150
}
146151

147152
// 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) {
173178
opts["fsname"] = fsname
174179
}
175180

181+
subtype := c.Subtype
182+
if subtype != "" {
183+
opts["subtype"] = subtype
184+
}
185+
176186
// Read only?
177187
if c.ReadOnly {
178188
opts["ro"] = ""

0 commit comments

Comments
 (0)