Fixed redundant internal op names.

geesefs-0-30-9
Aaron Jacobs 2015-07-27 15:52:13 +10:00
parent 407b005d68
commit 95a6177c0c
3 changed files with 13 additions and 13 deletions

View File

@ -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
}

View File

@ -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),

12
ops.go
View File

@ -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