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

Provide a String() method for fuse Status type.

parent ad9d8a5b
......@@ -449,7 +449,7 @@ func serialize(h *InHeader, res Status, out interface{}, flatData []byte, debug
}
log.Printf("Serialize: %v code: %v value: %v flat: %d\n",
operationName(h.Opcode), errorString(res), val, len(flatData))
operationName(h.Opcode), res, val, len(flatData))
}
return data
......
......@@ -133,11 +133,11 @@ func operationName(opcode uint32) string {
return "UNKNOWN"
}
func errorString(code Status) string {
func (code Status) String() string {
if code == OK {
return "OK"
}
return fmt.Sprintf("%d=%v", code, os.Errno(code))
return fmt.Sprintf("%d=%v", int(code), os.Errno(code))
}
func newInput(opcode uint32) Empty {
......
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