Added special cases for ReadFile and WriteFile.
parent
5c05a7c040
commit
6450a1cbbf
12
debug.go
12
debug.go
|
@ -18,6 +18,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/jacobsa/fuse/fuseops"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Decide on the name of the given op.
|
// Decide on the name of the given op.
|
||||||
|
@ -47,6 +49,16 @@ func describeRequest(op interface{}) (s string) {
|
||||||
switch typed := op.(type) {
|
switch typed := op.(type) {
|
||||||
case *interruptOp:
|
case *interruptOp:
|
||||||
addComponent("fuseid 0x%08x", typed.FuseID)
|
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.
|
// Use just the name if there is no extra info.
|
||||||
|
|
Loading…
Reference in New Issue