Commit f516f166 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: print Lseek

parent 09e6b67a
...@@ -82,7 +82,6 @@ func init() { ...@@ -82,7 +82,6 @@ func init() {
W_OK: "w", W_OK: "w",
R_OK: "r", R_OK: "r",
} }
} }
func FlagString(names map[int64]string, fl int64, def string) string { func FlagString(names map[int64]string, fl int64, def string) string {
...@@ -282,6 +281,23 @@ func (in *InterruptIn) string() string { ...@@ -282,6 +281,23 @@ func (in *InterruptIn) string() string {
return fmt.Sprintf("{ix %d}", in.Unique) return fmt.Sprintf("{ix %d}", in.Unique)
} }
var seekNames = map[uint32]string{
0: "SET",
1: "CUR",
2: "END",
3: "DATA",
4: "HOLE",
}
func (in *LseekIn) string() string {
return fmt.Sprintf("{Fh %d [%s +%d)}", in.Fh,
seekNames[in.Whence], in.Offset)
}
func (o *LseekOut) string() string {
return fmt.Sprintf("{%d}", o.Offset)
}
// Print pretty prints FUSE data types for kernel communication // Print pretty prints FUSE data types for kernel communication
func Print(obj interface{}) string { func Print(obj interface{}) string {
t, ok := obj.(interface { t, ok := obj.(interface {
......
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