forked from TrueCloudLab/rclone
cmount: allow extra options to pass to fuse with -o
This commit is contained in:
parent
b4466bd9b1
commit
938d7951ab
1 changed files with 7 additions and 2 deletions
|
@ -44,8 +44,9 @@ var (
|
||||||
gid = ^uint32(0) // overriden for non windows in mount_unix.go
|
gid = ^uint32(0) // overriden for non windows in mount_unix.go
|
||||||
// foreground = false
|
// foreground = false
|
||||||
// default permissions for directories - modified by umask in Mount
|
// default permissions for directories - modified by umask in Mount
|
||||||
dirPerms = os.FileMode(0777)
|
dirPerms = os.FileMode(0777)
|
||||||
filePerms = os.FileMode(0666)
|
filePerms = os.FileMode(0666)
|
||||||
|
extraOptions *[]string
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -64,6 +65,7 @@ func init() {
|
||||||
commandDefintion.Flags().BoolVarP(&writebackCache, "write-back-cache", "", writebackCache, "Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.")
|
commandDefintion.Flags().BoolVarP(&writebackCache, "write-back-cache", "", writebackCache, "Makes kernel buffer writes before sending them to rclone. Without this, writethrough caching is used.")
|
||||||
commandDefintion.Flags().VarP(&maxReadAhead, "max-read-ahead", "", "The number of bytes that can be prefetched for sequential reads.")
|
commandDefintion.Flags().VarP(&maxReadAhead, "max-read-ahead", "", "The number of bytes that can be prefetched for sequential reads.")
|
||||||
commandDefintion.Flags().IntVarP(&umask, "umask", "", umask, "Override the permission bits set by the filesystem.")
|
commandDefintion.Flags().IntVarP(&umask, "umask", "", umask, "Override the permission bits set by the filesystem.")
|
||||||
|
extraOptions = commandDefintion.Flags().StringArrayP("option", "o", []string{}, "Option for libfuse/WinFsp. Repeat if required.")
|
||||||
//commandDefintion.Flags().BoolVarP(&foreground, "foreground", "", foreground, "Do not detach.")
|
//commandDefintion.Flags().BoolVarP(&foreground, "foreground", "", foreground, "Do not detach.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,6 +206,9 @@ func mountOptions(device string, mountpoint string) (options []string) {
|
||||||
if writebackCache {
|
if writebackCache {
|
||||||
// FIXME? options = append(options, "-o", WritebackCache())
|
// FIXME? options = append(options, "-o", WritebackCache())
|
||||||
}
|
}
|
||||||
|
for _, option := range *extraOptions {
|
||||||
|
options = append(options, "-o", option)
|
||||||
|
}
|
||||||
return options
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue