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
417c54c1
Commit
417c54c1
authored
Mar 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started ServeOps.
parent
0a06b976
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
samples/memfs/fs.go
samples/memfs/fs.go
+38
-1
No files found.
samples/memfs/fs.go
View file @
417c54c1
...
@@ -93,7 +93,44 @@ func NewMemFS(
...
@@ -93,7 +93,44 @@ func NewMemFS(
// Helpers
// Helpers
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
func
(
fs
*
memFS
)
ServeOps
(
c
*
fuse
.
Connection
)
func
(
fs
*
memFS
)
ServeOps
(
c
*
fuse
.
Connection
)
{
for
{
op
,
err
:=
c
.
ReadOp
()
if
err
==
io
.
EOF
{
break
}
if
err
!=
nil
{
panic
(
err
)
}
switch
typed
:=
op
.
(
type
)
{
case
*
fuseops
.
InitOp
:
fs
.
init
(
typed
)
case
*
fuseops
.
LookUpInodeOp
:
fs
.
lookUpInode
(
typed
)
case
*
fuseops
.
GetInodeAttributesOp
:
fs
.
getInodeAttributes
(
typed
)
case
*
fuseops
.
OpenDirOp
:
fs
.
openDir
(
typed
)
case
*
fuseops
.
ReadDirOp
:
fs
.
readDir
(
typed
)
case
*
fuseops
.
OpenFileOp
:
fs
.
openFile
(
typed
)
case
*
fuseops
.
ReadFileOp
:
fs
.
readFile
(
typed
)
default
:
typed
.
Respond
(
fuse
.
ENOSYS
)
}
}
}
func
(
fs
*
memFS
)
checkInvariants
()
{
func
(
fs
*
memFS
)
checkInvariants
()
{
// Check reserved inodes.
// Check reserved inodes.
...
...
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