Commit c57ca849 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Allow arbitrary options to be passed to fusermount.

parent 941be276
......@@ -111,6 +111,9 @@ type FileSystemOptions struct {
type MountOptions struct {
AllowOther bool
// Options are passed as -o string to fusermount.
Options []string
// Default is _DEFAULT_BACKGROUND_TASKS, 12.
MaxBackground int
}
......
......@@ -3,6 +3,7 @@ package fuse
import (
"log"
"os"
"strings"
"syscall"
"time"
"unsafe"
......@@ -55,12 +56,12 @@ func (me *MountState) Mount(mountPoint string, opts *MountOptions) os.Error {
}
me.opts = opts
optStr := ""
optStrs := opts.Options
if opts.AllowOther {
optStr = "allow_other"
optStrs = append(optStrs, "allow_other")
}
file, mp, err := mount(mountPoint, optStr)
file, mp, err := mount(mountPoint, strings.Join(optStrs, ","))
if err != nil {
return err
}
......
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