Fixed redundant internal op names.
parent
407b005d68
commit
95a6177c0c
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
12
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue