Commit 95a6177c authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed redundant internal op names.

parent 407b005d
...@@ -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.(*internalInitOp) initOp, ok := op.(*initOp)
if !ok { if !ok {
c.Reply(ctx, syscall.EPROTO) c.Reply(ctx, syscall.EPROTO)
err = fmt.Errorf("Expected *internalInitOp, 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.(*internalInterruptOp); 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.(*internalStatFSOp); ok { if _, ok := op.(*statFSOp); ok {
c.Reply(ctx, nil) c.Reply(ctx, nil)
continue continue
} }
......
...@@ -340,7 +340,7 @@ func convertInMessage( ...@@ -340,7 +340,7 @@ func convertInMessage(
} }
case fusekernel.OpStatfs: case fusekernel.OpStatfs:
o = &internalStatFSOp{} o = &statFSOp{}
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 = &internalInterruptOp{ o = &interruptOp{
FuseID: in.Unique, FuseID: in.Unique,
} }
...@@ -362,7 +362,7 @@ func convertInMessage( ...@@ -362,7 +362,7 @@ func convertInMessage(
return return
} }
o = &internalInitOp{ 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),
......
...@@ -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 *internalStatFSOp: case *statFSOp:
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 *internalInterruptOp: case *interruptOp:
// No response. // No response.
case *internalInitOp: 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 internalStatFSOp struct { type statFSOp struct {
} }
type internalInterruptOp struct { type interruptOp struct {
FuseID uint64 FuseID uint64
} }
type internalInitOp struct { type initOp struct {
// In // In
Kernel fusekernel.Protocol Kernel fusekernel.Protocol
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment