Merge remote branch 'qmp/for-anthony' into staging
This commit is contained in:
commit
fef395782d
14
monitor.c
14
monitor.c
|
@ -351,10 +351,8 @@ static void monitor_json_emitter(Monitor *mon, const QObject *data)
|
||||||
{
|
{
|
||||||
QString *json;
|
QString *json;
|
||||||
|
|
||||||
if (mon->flags & MONITOR_USE_PRETTY)
|
json = mon->flags & MONITOR_USE_PRETTY ? qobject_to_json_pretty(data) :
|
||||||
json = qobject_to_json_pretty(data);
|
qobject_to_json(data);
|
||||||
else
|
|
||||||
json = qobject_to_json(data);
|
|
||||||
assert(json != NULL);
|
assert(json != NULL);
|
||||||
|
|
||||||
qstring_append_chr(json, '\n');
|
qstring_append_chr(json, '\n');
|
||||||
|
@ -4172,7 +4170,6 @@ void monitor_set_error(Monitor *mon, QError *qerror)
|
||||||
|
|
||||||
static void handler_audit(Monitor *mon, const mon_cmd_t *cmd, int ret)
|
static void handler_audit(Monitor *mon, const mon_cmd_t *cmd, int ret)
|
||||||
{
|
{
|
||||||
if (monitor_ctrl_mode(mon)) {
|
|
||||||
if (ret && !monitor_has_error(mon)) {
|
if (ret && !monitor_has_error(mon)) {
|
||||||
/*
|
/*
|
||||||
* If it returns failure, it must have passed on error.
|
* If it returns failure, it must have passed on error.
|
||||||
|
@ -4210,11 +4207,6 @@ static void handler_audit(Monitor *mon, const mon_cmd_t *cmd, int ret)
|
||||||
cmd->name, mon_print_count_get(mon));
|
cmd->name, mon_print_count_get(mon));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
} else {
|
|
||||||
assert(!monitor_has_error(mon));
|
|
||||||
QDECREF(mon->error);
|
|
||||||
mon->error = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_user_command(Monitor *mon, const char *cmdline)
|
static void handle_user_command(Monitor *mon, const char *cmdline)
|
||||||
|
@ -4745,11 +4737,9 @@ static void qmp_call_query_cmd(Monitor *mon, const mon_cmd_t *cmd)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmd->mhandler.info_new(mon, &ret_data);
|
cmd->mhandler.info_new(mon, &ret_data);
|
||||||
if (ret_data) {
|
|
||||||
monitor_protocol_emitter(mon, ret_data);
|
monitor_protocol_emitter(mon, ret_data);
|
||||||
qobject_decref(ret_data);
|
qobject_decref(ret_data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qmp_call_cmd(Monitor *mon, const mon_cmd_t *cmd,
|
static void qmp_call_cmd(Monitor *mon, const mon_cmd_t *cmd,
|
||||||
|
|
|
@ -495,7 +495,7 @@ EQMP
|
||||||
|
|
||||||
{
|
{
|
||||||
.name = "migrate_set_speed",
|
.name = "migrate_set_speed",
|
||||||
.args_type = "value:f",
|
.args_type = "value:o",
|
||||||
.params = "value",
|
.params = "value",
|
||||||
.help = "set maximum speed (in bytes) for migrations",
|
.help = "set maximum speed (in bytes) for migrations",
|
||||||
.user_print = monitor_user_noop,
|
.user_print = monitor_user_noop,
|
||||||
|
|
Loading…
Reference in a new issue