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
978bdd5f
Commit
978bdd5f
authored
Mar 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented Connection.ReadOp.
parent
be2f3fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
3 deletions
+23
-3
connection.go
connection.go
+23
-3
No files found.
connection.go
View file @
978bdd5f
...
@@ -23,8 +23,8 @@ import (
...
@@ -23,8 +23,8 @@ import (
// A connection to the fuse kernel process.
// A connection to the fuse kernel process.
type
Connection
struct
{
type
Connection
struct
{
logger
*
log
.
Logger
logger
*
log
.
Logger
wrapped
wrapped
*
bazilfuse
.
Conn
}
}
func
newConnection
(
wrapped
*
bazilfuse
.
Conn
)
(
c
*
Connection
,
err
error
)
func
newConnection
(
wrapped
*
bazilfuse
.
Conn
)
(
c
*
Connection
,
err
error
)
...
@@ -38,4 +38,24 @@ func newConnection(wrapped *bazilfuse.Conn) (c *Connection, err error)
...
@@ -38,4 +38,24 @@ func newConnection(wrapped *bazilfuse.Conn) (c *Connection, err error)
// close(2) causes WriteFileOps to be issued before a FlushFileOp, but doesn't
// close(2) causes WriteFileOps to be issued before a FlushFileOp, but doesn't
// wait for their response before issuing the latter (cf.
// wait for their response before issuing the latter (cf.
// https://github.com/jacobsa/fuse/issues/3).
// https://github.com/jacobsa/fuse/issues/3).
func
(
c
*
Connection
)
ReadOp
()
(
op
fuseops
.
Op
,
err
error
)
func
(
c
*
Connection
)
ReadOp
()
(
op
fuseops
.
Op
,
err
error
)
{
var
bfReq
bazilfuse
.
Request
// Keep going until we find a request we know how to convert.
for
{
// Read a bazilfuse request.
bfReq
,
err
=
c
.
wrapped
.
ReadRequest
()
if
err
!=
nil
{
return
}
// Convert it, if possible.
if
op
=
fuseops
.
Convert
(
bfReq
);
op
==
nil
{
c
.
logger
.
Printf
(
"Returning ENOSYS for unknown bazilfuse request: %v"
,
bfReq
)
bfReq
.
RespondError
(
ENOSYS
)
continue
}
return
}
}
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