Added special cases for ReadFile and WriteFile.

geesefs-0-30-9
Aaron Jacobs 2015-08-06 15:45:40 +10:00
parent 5c05a7c040
commit 6450a1cbbf
1 changed files with 12 additions and 0 deletions

View File

@ -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.