From 95a6177c0cfda90f3c6c937b6a06925570a27870 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Mon, 27 Jul 2015 15:52:13 +1000 Subject: [PATCH] Fixed redundant internal op names. --- connection.go | 8 ++++---- conversions.go | 6 +++--- ops.go | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/connection.go b/connection.go index f0632df..bd15d7a 100644 --- a/connection.go +++ b/connection.go @@ -130,10 +130,10 @@ func (c *Connection) Init() (err error) { return } - initOp, ok := op.(*internalInitOp) + initOp, ok := op.(*initOp) if !ok { c.Reply(ctx, syscall.EPROTO) - err = fmt.Errorf("Expected *internalInitOp, got %T", op) + err = fmt.Errorf("Expected *initOp, got %T", op) return } @@ -419,7 +419,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op interface{}, err error) { c.debugLog(opID, 1, "<- %#v", op) // Special case: handle interrupt requests inline. - if interruptOp, ok := op.(*internalInterruptOp); ok { + if interruptOp, ok := op.(*interruptOp); ok { c.handleInterrupt(interruptOp.FuseID) continue } @@ -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 // OS X. We don't currently expose the capability for the file system to // intercept this. - if _, ok := op.(*internalStatFSOp); ok { + if _, ok := op.(*statFSOp); ok { c.Reply(ctx, nil) continue } diff --git a/conversions.go b/conversions.go index e454466..436c07d 100644 --- a/conversions.go +++ b/conversions.go @@ -340,7 +340,7 @@ func convertInMessage( } case fusekernel.OpStatfs: - o = &internalStatFSOp{} + o = &statFSOp{} case fusekernel.OpInterrupt: type input fusekernel.InterruptIn @@ -350,7 +350,7 @@ func convertInMessage( return } - o = &internalInterruptOp{ + o = &interruptOp{ FuseID: in.Unique, } @@ -362,7 +362,7 @@ func convertInMessage( return } - o = &internalInitOp{ + o = &initOp{ Kernel: fusekernel.Protocol{in.Major, in.Minor}, MaxReadahead: in.MaxReadahead, Flags: fusekernel.InitFlags(in.Flags), diff --git a/ops.go b/ops.go index acdadc3..1cbee9c 100644 --- a/ops.go +++ b/ops.go @@ -158,14 +158,14 @@ func kernelResponseForOp( b = buffer.NewOutMessage(uintptr(len(o.Target))) b.AppendString(o.Target) - case *internalStatFSOp: + case *statFSOp: b = buffer.NewOutMessage(unsafe.Sizeof(fusekernel.StatfsOut{})) b.Grow(unsafe.Sizeof(fusekernel.StatfsOut{})) - case *internalInterruptOp: + case *interruptOp: // No response. - case *internalInitOp: + case *initOp: b = buffer.NewOutMessage(unsafe.Sizeof(fusekernel.InitOut{})) out := (*fusekernel.InitOut)(b.Grow(unsafe.Sizeof(fusekernel.InitOut{}))) @@ -193,14 +193,14 @@ type unknownOp struct { inode fuseops.InodeID } -type internalStatFSOp struct { +type statFSOp struct { } -type internalInterruptOp struct { +type interruptOp struct { FuseID uint64 } -type internalInitOp struct { +type initOp struct { // In Kernel fusekernel.Protocol