Commit 5b44ce2e authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Print input parameters for unsupported opcode as well.

parent 048c6333
......@@ -209,11 +209,16 @@ func (me *MountState) handleRequest(req *request) {
if req.handler == nil {
return
}
if me.Debug {
log.Println(req.InputDebug())
}
if req.handler.Func == nil {
log.Printf("Unimplemented opcode %v", req.inHeader.opcode)
req.status = ENOSYS
return
}
if req.status == OK {
if me.Debug {
log.Println(req.InputDebug())
}
req.handler.Func(me, req)
}
......
......@@ -431,7 +431,7 @@ func (me *FileSystemConnector) Mount(mountPoint string, fs FileSystem, opts *Mou
node = me.rootNode
}
if node == nil {
log.Println("Could not find mountpoint?", mountpoint)
log.Println("Could not find mountpoint?", mountPoint)
return ENOENT
}
......
......@@ -84,12 +84,8 @@ func (me *request) parse() {
me.arg = me.inputBuf[inHSize:]
me.handler = getHandler(me.inHeader.opcode)
if me.handler == nil || me.handler.Func == nil {
msg := "Unimplemented"
if me.handler == nil {
msg = "Unknown"
}
log.Printf("%s opcode %v", msg, me.inHeader.opcode)
if me.handler == nil {
log.Printf("Unknown opcode %v", me.inHeader.opcode)
me.status = ENOSYS
return
}
......
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