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
95a6177c
Commit
95a6177c
authored
Jul 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed redundant internal op names.
parent
407b005d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
connection.go
connection.go
+4
-4
conversions.go
conversions.go
+3
-3
ops.go
ops.go
+6
-6
No files found.
connection.go
View file @
95a6177c
...
@@ -130,10 +130,10 @@ func (c *Connection) Init() (err error) {
...
@@ -130,10 +130,10 @@ func (c *Connection) Init() (err error) {
return
return
}
}
initOp
,
ok
:=
op
.
(
*
in
ternalIn
itOp
)
initOp
,
ok
:=
op
.
(
*
initOp
)
if
!
ok
{
if
!
ok
{
c
.
Reply
(
ctx
,
syscall
.
EPROTO
)
c
.
Reply
(
ctx
,
syscall
.
EPROTO
)
err
=
fmt
.
Errorf
(
"Expected *in
ternalIn
itOp, got %T"
,
op
)
err
=
fmt
.
Errorf
(
"Expected *initOp, got %T"
,
op
)
return
return
}
}
...
@@ -419,7 +419,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
...
@@ -419,7 +419,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
c
.
debugLog
(
opID
,
1
,
"<- %#v"
,
op
)
c
.
debugLog
(
opID
,
1
,
"<- %#v"
,
op
)
// Special case: handle interrupt requests inline.
// Special case: handle interrupt requests inline.
if
interruptOp
,
ok
:=
op
.
(
*
inter
nalInter
ruptOp
);
ok
{
if
interruptOp
,
ok
:=
op
.
(
*
interruptOp
);
ok
{
c
.
handleInterrupt
(
interruptOp
.
FuseID
)
c
.
handleInterrupt
(
interruptOp
.
FuseID
)
continue
continue
}
}
...
@@ -431,7 +431,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
...
@@ -431,7 +431,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) {
// Special case: responding to statfs is required to make mounting work on
// Special case: responding to statfs is required to make mounting work on
// OS X. We don't currently expose the capability for the file system to
// OS X. We don't currently expose the capability for the file system to
// intercept this.
// intercept this.
if
_
,
ok
:=
op
.
(
*
internalS
tatFSOp
);
ok
{
if
_
,
ok
:=
op
.
(
*
s
tatFSOp
);
ok
{
c
.
Reply
(
ctx
,
nil
)
c
.
Reply
(
ctx
,
nil
)
continue
continue
}
}
...
...
conversions.go
View file @
95a6177c
...
@@ -340,7 +340,7 @@ func convertInMessage(
...
@@ -340,7 +340,7 @@ func convertInMessage(
}
}
case
fusekernel
.
OpStatfs
:
case
fusekernel
.
OpStatfs
:
o
=
&
internalS
tatFSOp
{}
o
=
&
s
tatFSOp
{}
case
fusekernel
.
OpInterrupt
:
case
fusekernel
.
OpInterrupt
:
type
input
fusekernel
.
InterruptIn
type
input
fusekernel
.
InterruptIn
...
@@ -350,7 +350,7 @@ func convertInMessage(
...
@@ -350,7 +350,7 @@ func convertInMessage(
return
return
}
}
o
=
&
inter
nalInter
ruptOp
{
o
=
&
interruptOp
{
FuseID
:
in
.
Unique
,
FuseID
:
in
.
Unique
,
}
}
...
@@ -362,7 +362,7 @@ func convertInMessage(
...
@@ -362,7 +362,7 @@ func convertInMessage(
return
return
}
}
o
=
&
in
ternalIn
itOp
{
o
=
&
initOp
{
Kernel
:
fusekernel
.
Protocol
{
in
.
Major
,
in
.
Minor
},
Kernel
:
fusekernel
.
Protocol
{
in
.
Major
,
in
.
Minor
},
MaxReadahead
:
in
.
MaxReadahead
,
MaxReadahead
:
in
.
MaxReadahead
,
Flags
:
fusekernel
.
InitFlags
(
in
.
Flags
),
Flags
:
fusekernel
.
InitFlags
(
in
.
Flags
),
...
...
ops.go
View file @
95a6177c
...
@@ -158,14 +158,14 @@ func kernelResponseForOp(
...
@@ -158,14 +158,14 @@ func kernelResponseForOp(
b
=
buffer
.
NewOutMessage
(
uintptr
(
len
(
o
.
Target
)))
b
=
buffer
.
NewOutMessage
(
uintptr
(
len
(
o
.
Target
)))
b
.
AppendString
(
o
.
Target
)
b
.
AppendString
(
o
.
Target
)
case
*
internalS
tatFSOp
:
case
*
s
tatFSOp
:
b
=
buffer
.
NewOutMessage
(
unsafe
.
Sizeof
(
fusekernel
.
StatfsOut
{}))
b
=
buffer
.
NewOutMessage
(
unsafe
.
Sizeof
(
fusekernel
.
StatfsOut
{}))
b
.
Grow
(
unsafe
.
Sizeof
(
fusekernel
.
StatfsOut
{}))
b
.
Grow
(
unsafe
.
Sizeof
(
fusekernel
.
StatfsOut
{}))
case
*
inter
nalInter
ruptOp
:
case
*
interruptOp
:
// No response.
// No response.
case
*
in
ternalIn
itOp
:
case
*
initOp
:
b
=
buffer
.
NewOutMessage
(
unsafe
.
Sizeof
(
fusekernel
.
InitOut
{}))
b
=
buffer
.
NewOutMessage
(
unsafe
.
Sizeof
(
fusekernel
.
InitOut
{}))
out
:=
(
*
fusekernel
.
InitOut
)(
b
.
Grow
(
unsafe
.
Sizeof
(
fusekernel
.
InitOut
{})))
out
:=
(
*
fusekernel
.
InitOut
)(
b
.
Grow
(
unsafe
.
Sizeof
(
fusekernel
.
InitOut
{})))
...
@@ -193,14 +193,14 @@ type unknownOp struct {
...
@@ -193,14 +193,14 @@ type unknownOp struct {
inode
fuseops
.
InodeID
inode
fuseops
.
InodeID
}
}
type
internalS
tatFSOp
struct
{
type
s
tatFSOp
struct
{
}
}
type
inter
nalInter
ruptOp
struct
{
type
interruptOp
struct
{
FuseID
uint64
FuseID
uint64
}
}
type
in
ternalIn
itOp
struct
{
type
initOp
struct
{
// In
// In
Kernel
fusekernel
.
Protocol
Kernel
fusekernel
.
Protocol
...
...
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