Fixed the signature for Convert.

geesefs-0-30-9
Aaron Jacobs 2015-07-27 14:30:34 +10:00
parent 585af56849
commit f93dfe355f
1 changed files with 6 additions and 19 deletions

View File

@ -17,36 +17,23 @@ package fuse
import ( import (
"bytes" "bytes"
"errors" "errors"
"log"
"os" "os"
"syscall" "syscall"
"time" "time"
"unsafe" "unsafe"
"github.com/jacobsa/fuse/fuseops"
"github.com/jacobsa/fuse/internal/buffer" "github.com/jacobsa/fuse/internal/buffer"
"github.com/jacobsa/fuse/internal/fusekernel" "github.com/jacobsa/fuse/internal/fusekernel"
"golang.org/x/net/context"
) )
// This function is an implementation detail of the fuse package, and must not // Convert a kernel message to an appropriate implementation of fuseops.Op. If
// be called by anyone else. // the op is unknown, a special unexported type will be used.
// //
// Convert the supplied fuse kernel message to an Op. sendReply will be used to // The caller is responsible for arranging for the message to be destroyed.
// send the reply back to the kernel once the user calls o.Respond. If the op func convertInMessage(
// is unknown, a special unexported type will be used.
//
// The debug logging function and error logger may be nil. The caller is
// responsible for arranging for the message to be destroyed.
func Convert(
opCtx context.Context,
m *buffer.InMessage, m *buffer.InMessage,
protocol fusekernel.Protocol, protocol fusekernel.Protocol) (o fuseops.Op, err error) {
debugLogForOp func(int, string, ...interface{}),
errorLogger *log.Logger,
sendReply replyFunc) (o Op, err error) {
var co *commonOp
var io internalOp
switch m.Header().Opcode { switch m.Header().Opcode {
case fusekernel.OpLookup: case fusekernel.OpLookup:
buf := m.ConsumeBytes(m.Len()) buf := m.ConsumeBytes(m.Len())