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
d6d4cb87
Commit
d6d4cb87
authored
Jul 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Connection.Init.
parent
fd0e095b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
connection.go
connection.go
+5
-4
No files found.
connection.go
View file @
d6d4cb87
...
...
@@ -90,7 +90,7 @@ type Connection struct {
// context that the user uses to reply to the op.
type
opState
struct
{
inMsg
*
buffer
.
InMessage
op
Op
op
fuseops
.
Op
opID
uint64
// For logging
}
...
...
@@ -125,7 +125,7 @@ func newConnection(
// Do the work necessary to cause the mount process to complete.
func
(
c
*
Connection
)
Init
()
(
err
error
)
{
// Read the init op.
op
,
err
:=
c
.
ReadOp
()
ctx
,
op
,
err
:=
c
.
ReadOp
()
if
err
!=
nil
{
err
=
fmt
.
Errorf
(
"Reading init op: %v"
,
err
)
return
...
...
@@ -133,6 +133,7 @@ func (c *Connection) Init() (err error) {
initOp
,
ok
:=
op
.
(
*
internalInitOp
)
if
!
ok
{
c
.
Reply
(
ctx
,
syscall
.
EPROTO
)
err
=
fmt
.
Errorf
(
"Expected *internalInitOp, got %T"
,
op
)
return
}
...
...
@@ -144,7 +145,7 @@ func (c *Connection) Init() (err error) {
}
if
initOp
.
Kernel
.
LT
(
min
)
{
initOp
.
Respond
(
syscall
.
EPROTO
)
c
.
Reply
(
ctx
,
syscall
.
EPROTO
)
err
=
fmt
.
Errorf
(
"Version too old: %v"
,
initOp
.
Kernel
)
return
}
...
...
@@ -164,8 +165,8 @@ func (c *Connection) Init() (err error) {
initOp
.
MaxReadahead
=
maxReadahead
initOp
.
MaxWrite
=
buffer
.
MaxWriteSize
initOp
.
Flags
=
fusekernel
.
InitBigWrites
initOp
.
Respond
(
nil
)
c
.
Reply
(
ctx
,
nil
)
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