Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
c57ca849
Commit
c57ca849
authored
Aug 29, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow arbitrary options to be passed to fusermount.
parent
941be276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
fuse/api.go
fuse/api.go
+3
-0
fuse/mountstate.go
fuse/mountstate.go
+4
-3
No files found.
fuse/api.go
View file @
c57ca849
...
...
@@ -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
}
...
...
fuse/mountstate.go
View file @
c57ca849
...
...
@@ -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
:=
""
optStr
s
:=
opts
.
Options
if
opts
.
AllowOther
{
optStr
=
"allow_other"
optStr
s
=
append
(
optStrs
,
"allow_other"
)
}
file
,
mp
,
err
:=
mount
(
mountPoint
,
optStr
)
file
,
mp
,
err
:=
mount
(
mountPoint
,
strings
.
Join
(
optStrs
,
","
)
)
if
err
!=
nil
{
return
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment