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

fuse: print OPCODE-<NUM> for unknown opcodes

parent ce2558b4
...@@ -6,6 +6,7 @@ package fuse ...@@ -6,6 +6,7 @@ package fuse
import ( import (
"bytes" "bytes"
"fmt"
"log" "log"
"reflect" "reflect"
"runtime" "runtime"
...@@ -483,7 +484,7 @@ func getHandler(o int32) *operationHandler { ...@@ -483,7 +484,7 @@ func getHandler(o int32) *operationHandler {
func init() { func init() {
operationHandlers = make([]*operationHandler, _OPCODE_COUNT) operationHandlers = make([]*operationHandler, _OPCODE_COUNT)
for i := range operationHandlers { for i := range operationHandlers {
operationHandlers[i] = &operationHandler{Name: "UNKNOWN"} operationHandlers[i] = &operationHandler{Name: fmt.Sprintf("OPCODE-%d", i)}
} }
fileOps := []int32{_OP_READLINK, _OP_NOTIFY_INVAL_ENTRY, _OP_NOTIFY_DELETE} fileOps := []int32{_OP_READLINK, _OP_NOTIFY_INVAL_ENTRY, _OP_NOTIFY_DELETE}
......
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