Commit 2867ce4a authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf
Browse files

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 6936f299 cleaned that up in qemu-img.c, but two calls have crept
in since.  Take care of them the same way.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 6ec46ad5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;
    }