|
@@ -41,8 +41,7 @@ static void hmp_handle_error(Monitor *mon, Error **errp)
|
|
{
|
|
{
|
|
assert(errp);
|
|
assert(errp);
|
|
if (*errp) {
|
|
if (*errp) {
|
|
- monitor_printf(mon, "%s\n", error_get_pretty(*errp));
|
|
|
|
- error_free(*errp);
|
|
|
|
|
|
+ error_report_err(*errp);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -556,8 +555,7 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
info = qmp_query_vnc(&err);
|
|
info = qmp_query_vnc(&err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "%s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -679,8 +677,7 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
info = qmp_query_balloon(&err);
|
|
info = qmp_query_balloon(&err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "%s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -948,8 +945,7 @@ void hmp_ringbuf_read(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
data = qmp_ringbuf_read(chardev, size, false, 0, &err);
|
|
data = qmp_ringbuf_read(chardev, size, false, 0, &err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "%s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1042,8 +1038,7 @@ void hmp_balloon(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
qmp_balloon(value, &err);
|
|
qmp_balloon(value, &err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "balloon: %s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1191,8 +1186,7 @@ void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
qmp_migrate_set_cache_size(value, &err);
|
|
qmp_migrate_set_cache_size(value, &err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "%s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1229,9 +1223,7 @@ void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
|
|
qapi_free_MigrationCapabilityStatusList(caps);
|
|
qapi_free_MigrationCapabilityStatusList(caps);
|
|
|
|
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "migrate_set_capability: %s\n",
|
|
|
|
- error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1281,9 +1273,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
|
}
|
|
}
|
|
|
|
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "migrate_set_parameter: %s\n",
|
|
|
|
- error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1544,8 +1534,7 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
|
|
|
|
|
|
qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, &err);
|
|
qmp_migrate(uri, !!blk, blk, !!inc, inc, false, false, &err);
|
|
if (err) {
|
|
if (err) {
|
|
- monitor_printf(mon, "migrate: %s\n", error_get_pretty(err));
|
|
|
|
- error_free(err);
|
|
|
|
|
|
+ error_report_err(err);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|