From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, groug@kaod.org, lu.zhipeng@zte.com.cn
Subject: [Qemu-devel] [PULL 1/2] hmp: Replace error_report_err
Date: Mon, 30 Oct 2017 20:23:55 +0000 [thread overview]
Message-ID: <20171030202356.11047-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20171030202356.11047-1-dgilbert@redhat.com>
From: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
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>
---
hmp.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/hmp.c b/hmp.c
index a01be50daa..35a7041824 100644
--- a/hmp.c
+++ b/hmp.c
@@ -670,7 +670,7 @@ void hmp_info_vnc(Monitor *mon, const QDict *qdict)
info2l = qmp_query_vnc_servers(&err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
if (!info2l) {
@@ -785,7 +785,7 @@ void hmp_info_balloon(Monitor *mon, const QDict *qdict)
info = qmp_query_balloon(&err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
@@ -1128,7 +1128,7 @@ void hmp_ringbuf_read(Monitor *mon, const QDict *qdict)
data = qmp_ringbuf_read(chardev, size, false, 0, &err);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
@@ -1195,9 +1195,7 @@ void hmp_balloon(Monitor *mon, const QDict *qdict)
Error *err = NULL;
qmp_balloon(value, &err);
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
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;
qmp_migrate_set_cache_size(value, &err);
- if (err) {
- error_report_err(err);
- return;
- }
+ hmp_handle_error(mon, &err);
}
/* Kept for backwards compatibility */
@@ -1568,10 +1563,7 @@ void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
end:
qapi_free_MigrationCapabilityStatusList(caps);
-
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
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:
qapi_free_MigrateSetParameters(p);
visit_free(v);
- if (err) {
- error_report_err(err);
- }
+ hmp_handle_error(mon, &err);
}
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);
if (err) {
- error_report_err(err);
+ hmp_handle_error(mon, &err);
return;
}
--
2.14.3
next prev parent reply other threads:[~2017-10-30 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-30 20:23 [Qemu-devel] [PULL 0/2] hmp queue Dr. David Alan Gilbert (git)
2017-10-30 20:23 ` Dr. David Alan Gilbert (git) [this message]
2017-10-30 20:23 ` [Qemu-devel] [PULL 2/2] monitor: fix dangling CPU pointer Dr. David Alan Gilbert (git)
2017-10-31 13:11 ` [Qemu-devel] [PULL 0/2] hmp queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171030202356.11047-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=groug@kaod.org \
--cc=lu.zhipeng@zte.com.cn \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).