Skip to contentSkip to conversation

qemu-img: Avoid qerror_report_err() outside QMP handlers, again

PATCH Applied Markus Armbruster 3 participants 3 messages Mar 12, 2015 – Mar 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-img: Avoid qerror_report_err() outside QMP handlers, again

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.

---
 qemu-img.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
qemu-img.c +2 -4
index 5af6f45..c797d19 100644
@@ -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;
     }
Signature · 1 line
1.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Markus Armbruster

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.

---
 qemu-img.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Applied
#2 lore raw
In reply to Markus Armbruster

Am 12.03.2015 um 16:08 hat Markus Armbruster geschrieben:

Quoted 8 lines

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.

Thanks, applied to the block branch.

Kevin