Commit f93dfe35 authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed the signature for Convert.

parent 585af568
...@@ -17,36 +17,23 @@ package fuse ...@@ -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())
......
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