diff options
author | Markus Armbruster <armbru@redhat.com> | 2015-03-12 16:08:02 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-03-16 17:07:25 +0100 |
commit | 2867ce4ab86c77579e94c6bb2b6e44ddfcf67f5d (patch) | |
tree | d73f834e45810b1ed8e9a422e6080edc088ed194 /qemu-img.c | |
parent | 6ec46ad541b20a1530cedc741d19eea9ffc39ac3 (diff) | |
download | qemu-2867ce4ab86c77579e94c6bb2b6e44ddfcf67f5d.tar.gz qemu-2867ce4ab86c77579e94c6bb2b6e44ddfcf67f5d.tar.bz2 qemu-2867ce4ab86c77579e94c6bb2b6e44ddfcf67f5d.zip |
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.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c index 82d907801e..9dddfbefce 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; } |