Commit 6450a1cb authored by Aaron Jacobs's avatar Aaron Jacobs

Added special cases for ReadFile and WriteFile.

parent 5c05a7c0
......@@ -18,6 +18,8 @@ import (
"fmt"
"reflect"
"strings"
"github.com/jacobsa/fuse/fuseops"
)
// Decide on the name of the given op.
......@@ -47,6 +49,16 @@ func describeRequest(op interface{}) (s string) {
switch typed := op.(type) {
case *interruptOp:
addComponent("fuseid 0x%08x", typed.FuseID)
case *fuseops.ReadFileOp:
addComponent("handle %d", typed.Handle)
addComponent("offset %d", typed.Offset)
addComponent("%d bytes", len(typed.Dst))
case *fuseops.WriteFileOp:
addComponent("handle %d", typed.Handle)
addComponent("offset %d", typed.Offset)
addComponent("%d bytes", len(typed.Data))
}
// Use just the name if there is no extra info.
......
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