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
b65f3376
Commit
b65f3376
authored
May 18, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow setting a file system name.
parent
54cb69c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
mounted_file_system.go
mounted_file_system.go
+10
-0
No files found.
mounted_file_system.go
View file @
b65f3376
...
...
@@ -65,6 +65,11 @@ type MountConfig struct {
// should inherit. If nil, context.Background() will be used.
OpContext
context
.
Context
// If non-empty, the name of the file system as displayed by e.g. `mount`.
// This is important because the `umount` command requires root privileges if
// it doesn't agree with /etc/fstab.
FSName
string
// Mount the file system in read-only mode. File modes will appear as normal,
// but opening a file for writing and metadata operations like chmod,
// chtimes, etc. will fail.
...
...
@@ -94,6 +99,11 @@ func (c *MountConfig) bazilfuseOptions() (opts []bazilfuse.MountOption) {
// InodeAttributes.Mode.
opts
=
append
(
opts
,
bazilfuse
.
SetOption
(
"default_permissions"
,
""
))
// Special file system name?
if
c
.
FSName
!=
""
{
opts
=
append
(
opts
,
bazilfuse
.
FSName
(
c
.
FSName
))
}
// Read only?
if
c
.
ReadOnly
{
opts
=
append
(
opts
,
bazilfuse
.
ReadOnly
())
...
...
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