qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again
@ 2015-03-12 15:08 Markus Armbruster
  2015-03-12 16:43 ` Eric Blake
  2015-03-16 15:07 ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Armbruster @ 2015-03-12 15:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha, qemu-block, mreitz

qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.  Replace by error_report_err().

Commit 6936f29 cleaned that up in qemu-img.c, but two calls have crept
in since.  Take care of them the same way.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-img.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 5af6f45..c797d19 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -274,8 +274,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
     if (filename) {
         proto_drv = bdrv_find_protocol(filename, true, &local_err);
         if (!proto_drv) {
-            qerror_report_err(local_err);
-            error_free(local_err);
+            error_report_err(local_err);
             qemu_opts_free(create_opts);
             return 1;
         }
@@ -1526,8 +1525,7 @@ static int img_convert(int argc, char **argv)
 
     proto_drv = bdrv_find_protocol(out_filename, true, &local_err);
     if (!proto_drv) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+        error_report_err(local_err);
         ret = -1;
         goto out;
     }
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again
  2015-03-12 15:08 [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again Markus Armbruster
@ 2015-03-12 16:43 ` Eric Blake
  2015-03-16 15:07 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2015-03-12 16:43 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: kwolf, qemu-block, stefanha, mreitz

[-- Attachment #1: Type: text/plain, Size: 658 bytes --]

On 03/12/2015 09:08 AM, Markus Armbruster wrote:
> qerror_report_err() is a transitional interface to help with
> converting existing monitor commands to QMP.  It should not be used
> elsewhere.  Replace by error_report_err().
> 
> Commit 6936f29 cleaned that up in qemu-img.c, but two calls have crept
> in since.  Take care of them the same way.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qemu-img.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again
  2015-03-12 15:08 [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again Markus Armbruster
  2015-03-12 16:43 ` Eric Blake
@ 2015-03-16 15:07 ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2015-03-16 15:07 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: stefanha, qemu-devel, qemu-block, mreitz

Am 12.03.2015 um 16:08 hat Markus Armbruster geschrieben:
> qerror_report_err() is a transitional interface to help with
> converting existing monitor commands to QMP.  It should not be used
> elsewhere.  Replace by error_report_err().
> 
> Commit 6936f29 cleaned that up in qemu-img.c, but two calls have crept
> in since.  Take care of them the same way.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-16 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12 15:08 [Qemu-devel] [PATCH] qemu-img: Avoid qerror_report_err() outside QMP handlers, again Markus Armbruster
2015-03-12 16:43 ` Eric Blake
2015-03-16 15:07 ` Kevin Wolf

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).