Commit dd1fcfed authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed more build errors.

parent d6d4cb87
......@@ -91,7 +91,7 @@ type Connection struct {
type opState struct {
inMsg *buffer.InMessage
op fuseops.Op
opID uint64 // For logging
opID uint32 // For logging
}
// Create a connection wrapping the supplied file descriptor connected to the
......@@ -407,7 +407,7 @@ func (c *Connection) ReadOp() (ctx context.Context, op fuseops.Op, err error) {
}
// Convert the message to an op.
op, err := convertInMessage(m, c.protocol)
op, err = convertInMessage(m, c.protocol)
if err != nil {
err = fmt.Errorf("convertInMessage: %v", err)
return
......@@ -420,14 +420,14 @@ func (c *Connection) ReadOp() (ctx context.Context, op fuseops.Op, err error) {
c.debugLog(opID, 1, "<- %#v", op)
// Special case: handle interrupt requests inline.
if interruptOp, ok := op.(*fuseops.InternalInterruptOp); ok {
if interruptOp, ok := op.(*internalInterruptOp); ok {
c.handleInterrupt(interruptOp.FuseID)
continue
}
// Set up a context that remembers information about this op.
ctx = c.beginOp(m.Header().Opcode, m.Header().Unique)
ctx = context.WithValue(ctx, contextKey, opState{m, opID, op})
ctx = context.WithValue(ctx, contextKey, opState{m, op, opID})
// 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
......@@ -442,6 +442,14 @@ func (c *Connection) ReadOp() (ctx context.Context, op fuseops.Op, err error) {
}
}
// Reply to an op previously read using ReadOp, with the supplied error (or nil
// if successful). The context must be the context returned by ReadOp.
//
// LOCKS_EXCLUDED(c.mu)
func (c *Connection) Reply(ctx context.Context, err error) {
panic("TODO")
}
// Close the connection. Must not be called until operations that were read
// from the connection have been responded to.
func (c *Connection) close() (err error) {
......
......@@ -15,6 +15,7 @@
package fuse
import (
"fmt"
"syscall"
"unsafe"
......@@ -151,6 +152,22 @@ func kernelResponse(
// Internal
////////////////////////////////////////////////////////////////////////
// A sentinel used for unknown ops. The user is expected to respond with a
// non-nil error.
type unknownOp struct {
opCode uint32
inode fuseops.InodeID
}
func (o *unknownOp) ShortDesc() (desc string) {
desc = fmt.Sprintf("<opcode %d>(inode=%v)", o.opCode, o.inode)
return
}
func (o *unknownOp) DebugString() string {
return o.ShortDesc()
}
// Common implementation for our "internal" ops that don't need to be pretty.
type internalOp struct {
}
......
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