Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
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
Joshua
wendelin.core
Commits
207b32fb
Commit
207b32fb
authored
Oct 05, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
878b2787
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
wcfs/misc.go
wcfs/misc.go
+16
-0
wcfs/wcfs.go
wcfs/wcfs.go
+10
-4
No files found.
wcfs/misc.go
View file @
207b32fb
...
...
@@ -93,6 +93,22 @@ func mkfile(parent nodefs.Node, name string, child nodefs.Node) {
}
// mount is like nodefs.MountRoot but allows to pass in full fuse.MountOptions.
func
mount
(
mntpt
string
,
root
nodefs
.
Node
,
opts
*
fuse
.
MountOptions
)
(
*
fuse
.
Server
,
*
nodefs
.
FileSystemConnector
,
error
)
{
nodefsOpts
:=
nodefs
.
NewOptions
()
nodefsOpts
.
Debug
=
opts
.
Debug
fsconn
:=
nodefs
.
NewFileSystemConnector
(
root
,
nodefsOpts
)
fssrv
,
err
:=
fuse
.
NewServer
(
fsconn
.
RawFS
(),
mntpt
,
opts
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
return
fssrv
,
fsconn
,
nil
}
// typeOf returns ZODB type of an object.
//
// it differs from %T in fmt in that it supports printing zodb.Broken with
...
...
wcfs/wcfs.go
View file @
207b32fb
...
...
@@ -587,12 +587,18 @@ func main() {
// mount root
opts
:=
nodefs
.
NewOptions
()
opts
.
Debug
=
*
debug
opts
:=
&
fuse
.
MountOptions
{
FsName
:
"wcfs"
,
// XXX recheck
Name
:
"abc"
,
// XXX recheck
DisableXAttrs
:
true
,
// we don't use
Debug
:
*
debug
,
}
root
:=
nodefs
.
NewDefaultNode
()
server
,
fsconn
,
err
:=
nodefs
.
MountRoo
t
(
mntpt
,
root
,
opts
)
fssrv
,
fsconn
,
err
:=
moun
t
(
mntpt
,
root
,
opts
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
...
...
@@ -610,5 +616,5 @@ func main() {
_
=
autoexit
// serve client requests
server
.
Serve
()
// XXX Serve returns no error
fssrv
.
Serve
()
// XXX Serve returns no error
}
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