Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
440c9ee7
Commit
440c9ee7
authored
Jul 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MountConfig.toMap
parent
ba66e02a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
mount_config.go
mount_config.go
+12
-18
No files found.
mount_config.go
View file @
440c9ee7
...
...
@@ -18,8 +18,6 @@ import (
"log"
"runtime"
"github.com/jacobsa/fuse/internal/fuseshim"
"golang.org/x/net/context"
)
...
...
@@ -75,21 +73,12 @@ type MountConfig struct {
// Create a map containing all of the key=value mount options to be given to
// the mount helper.
func
(
c
*
MountConfig
)
toMap
()
(
opts
map
[
string
]
string
)
{
panic
(
"TODO"
)
}
// Create an options string suitable for passing to the mount helper.
func
(
c
*
MountConfig
)
toOptionsString
()
string
{
panic
(
"TODO"
)
}
// Convert to mount options to be passed to package fuseshim.
func
(
c
*
MountConfig
)
bazilfuseOptions
()
(
opts
[]
fuseshim
.
MountOption
)
{
isDarwin
:=
runtime
.
GOOS
==
"darwin"
opts
=
make
(
map
[
string
]
string
)
// Enable permissions checking in the kernel. See the comments on
// InodeAttributes.Mode.
opts
=
append
(
opts
,
fuseshim
.
SetOption
(
"default_permissions"
,
""
))
opts
[
"default_permissions"
]
=
""
// HACK(jacobsa): Work around what appears to be a bug in systemd v219, as
// shipped in Ubuntu 15.04, where it automatically unmounts any file system
...
...
@@ -107,17 +96,17 @@ func (c *MountConfig) bazilfuseOptions() (opts []fuseshim.MountOption) {
// Special file system name?
if
fsname
!=
""
{
opts
=
append
(
opts
,
fuseshim
.
FSName
(
fsname
))
opts
[
"fsname"
]
=
fsname
}
// Read only?
if
c
.
ReadOnly
{
opts
=
append
(
opts
,
fuseshim
.
ReadOnly
())
opts
[
"ro"
]
=
""
}
// OS X: set novncache when appropriate.
if
isDarwin
&&
!
c
.
EnableVnodeCaching
{
opts
=
append
(
opts
,
fuseshim
.
SetOption
(
"novncache"
,
""
))
opts
[
"novncache"
]
=
""
}
// OS X: disable the use of "Apple Double" (._foo and .DS_Store) files, which
...
...
@@ -126,13 +115,18 @@ func (c *MountConfig) bazilfuseOptions() (opts []fuseshim.MountOption) {
//
// Cf. https://github.com/osxfuse/osxfuse/wiki/Mount-options
if
isDarwin
{
opts
=
append
(
opts
,
fuseshim
.
SetOption
(
"noappledouble"
,
""
))
opts
[
"noappledouble"
]
=
""
}
// Last but not least: other user-supplied options.
for
k
,
v
:=
range
c
.
Options
{
opts
=
append
(
opts
,
fuseshim
.
SetOption
(
k
,
v
))
opts
[
k
]
=
v
}
return
}
// Create an options string suitable for passing to the mount helper.
func
(
c
*
MountConfig
)
toOptionsString
()
string
{
panic
(
"TODO"
)
}
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