Monitor: Debugging support
Add configure options (--enable-debug-mon and --disable-debug-mon)plus the MON_DEBUG() macro.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Monitor: Drop the print disabling mechanism
We can ignore calls to monitor_vprintf() in QMP mode and usemonitor_puts() directly in monitor_json_emitter().
This allows us to drop this ugly hack.
Monitor: Audit handler return
This commit verifies the following two rules specified byMarkus Armbruster:
1. If the handler returns failure, it must have passed an error.
If it didn't, it's broken. Report an internal error to the client, and report the bug to the programmer....
Monitor: Debug stray prints the right way
QObject Monitor handlers should not call any Monitor printfunction: they should only build objects, printing is doneby common code.
Current QMP code will ignore such calls, as we can't sendgarbage to clients, additionally it will also emit an...
Monitor: Convert do_migrate() to cmd_new_ret()
While there I'm also dropping a unneeded else clause (the lastone in the function).
Monitor: Convert do_memory_save() to cmd_new_ret()
Monitor: Convert do_physical_memory_save() to cmd_new_ret()
Monitor: Convert do_info() to cmd_new_ret()
Note that this function only fails in QMP, in the user Monitorit prints the help text instead.
Monitor: Convert do_change() to cmd_new_ret()
Not that trivial as the call chain also has to be modified.
Monitor: Rename cmd_new_ret()
Now that all handlers are converted to cmd_new_ret(), we can renameit back to cmd_new(). But now it returns a value.
View all revisions | View revisions
Also available in: Atom