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

Reinstate file name printing in debug mode.

parent 88ab347f
...@@ -292,10 +292,15 @@ func (me *MountState) handle(req *request) { ...@@ -292,10 +292,15 @@ func (me *MountState) handle(req *request) {
func (me *MountState) dispatch(req *request, handler *operationHandler) { func (me *MountState) dispatch(req *request, handler *operationHandler) {
if me.Debug { if me.Debug {
nm := "" handler := getHandler(req.inHeader.Opcode)
// TODO - reinstate filename printing. var names interface{}
log.Printf("Dispatch: %v, NodeId: %v %s\n", if handler.FileNames > 0 {
operationName(req.inHeader.Opcode), req.inHeader.NodeId, nm) names = req.filenames(handler.FileNames)
} else {
names = ""
}
log.Printf("Dispatch: %v, NodeId: %v %v\n",
operationName(req.inHeader.Opcode), req.inHeader.NodeId, names)
} }
handler.Func(me, req) handler.Func(me, req)
} }
......
...@@ -260,6 +260,7 @@ type operationHandler struct { ...@@ -260,6 +260,7 @@ type operationHandler struct {
OutputSize int OutputSize int
DecodeIn castPointerFunc DecodeIn castPointerFunc
DecodeOut castPointerFunc DecodeOut castPointerFunc
FileNames int
} }
var operationHandlers []*operationHandler var operationHandlers []*operationHandler
...@@ -425,4 +426,18 @@ func init() { ...@@ -425,4 +426,18 @@ func init() {
operationHandlers[op].DecodeOut = f operationHandlers[op].DecodeOut = f
} }
for op, count := range map[Opcode]int {
FUSE_LOOKUP: 1,
FUSE_RENAME: 2,
FUSE_SYMLINK: 2,
FUSE_GETXATTR: 1,
FUSE_CREATE: 1,
FUSE_MKNOD: 1,
FUSE_MKDIR: 1,
FUSE_UNLINK: 1,
FUSE_RMDIR: 1,
FUSE_REMOVEXATTR: 1,
} {
operationHandlers[op].FileNames = count
}
} }
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