mirror of https://github.com/xemu-project/xemu.git
hmp: Replace error_report_err
Use hmp_handle_error instend of error_report_err to set error. Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn> Reviewed-by: Jiyun Fan <fan.jiyun@zte.com.cn> Message-Id: <1508411793-22868-1-git-send-email-lu.zhipeng@zte.com.cn> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
abf6e752e5
commit
554a39eb32
26
hmp.c
26
hmp.c
|
@ -670,7 +670,7 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict)
|
||||||
|
|
||||||
info2l = qmp_query_vnc_servers(&err);
|
info2l = qmp_query_vnc_servers(&err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report_err(err);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!info2l) {
|
if (!info2l) {
|
||||||
|
@ -785,7 +785,7 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
|
||||||
|
|
||||||
info = qmp_query_balloon(&err);
|
info = qmp_query_balloon(&err);
|
||||||
if (err) {
|
if (err) {
|
||||||
error_report_err(err);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1128,7 +1128,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) {
|
||||||
error_report_err(err);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1195,9 +1195,7 @@ void hmp_balloon(Monitor *mon, const QDict *qdict)
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
qmp_balloon(value, &err);
|
qmp_balloon(value, &err);
|
||||||
if (err) {
|
hmp_handle_error(mon, &err);
|
||||||
error_report_err(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmp_block_resize(Monitor *mon, const QDict *qdict)
|
void hmp_block_resize(Monitor *mon, const QDict *qdict)
|
||||||
|
@ -1534,10 +1532,7 @@ void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict)
|
||||||
Error *err = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
qmp_migrate_set_cache_size(value, &err);
|
qmp_migrate_set_cache_size(value, &err);
|
||||||
if (err) {
|
hmp_handle_error(mon, &err);
|
||||||
error_report_err(err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Kept for backwards compatibility */
|
/* Kept for backwards compatibility */
|
||||||
|
@ -1568,10 +1563,7 @@ void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
|
||||||
|
|
||||||
end:
|
end:
|
||||||
qapi_free_MigrationCapabilityStatusList(caps);
|
qapi_free_MigrationCapabilityStatusList(caps);
|
||||||
|
hmp_handle_error(mon, &err);
|
||||||
if (err) {
|
|
||||||
error_report_err(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
||||||
|
@ -1680,9 +1672,7 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
|
||||||
cleanup:
|
cleanup:
|
||||||
qapi_free_MigrateSetParameters(p);
|
qapi_free_MigrateSetParameters(p);
|
||||||
visit_free(v);
|
visit_free(v);
|
||||||
if (err) {
|
hmp_handle_error(mon, &err);
|
||||||
error_report_err(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict)
|
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict)
|
||||||
|
@ -1936,7 +1926,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) {
|
||||||
error_report_err(err);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue