This avoids handle_user_command() calling monitor_call_handler(), which is currently shared with QMP.
Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com> --- monitor.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index a48f919..adc5bbd 100644 --- a/monitor.c +++ b/monitor.c @@ -3914,7 +3914,15 @@ static void handle_user_command(Monitor *mon, const char *cmdline) if (handler_is_async(cmd)) { user_async_cmd_handler(mon, cmd, qdict); } else if (handler_is_qobject(cmd)) { - monitor_call_handler(mon, cmd, qdict); + QObject *data = NULL; + + /* XXX: ignores the error code */ + cmd->mhandler.cmd_new(mon, qdict, &data); + assert(!monitor_has_error(mon)); + if (data) { + cmd->user_print(mon, data); + qobject_decref(data); + } } else { cmd->mhandler.cmd(mon, qdict); } -- 1.7.3.1.45.g9855b