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