Skip to content

Commit

Permalink
blockdev: Don't use qerror_report_err() in drive_init()
Browse files Browse the repository at this point in the history
qerror_report_err() is a transitional interface to help with
converting existing HMP commands to QMP.  It should not be used
elsewhere.

drive_init() is not meant to be used by QMP commands.  It uses both
qerror_report_err() and error_report().  Convert the former to the
latter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Markus Armbruster authored and stefanhaRH committed May 28, 2014
1 parent 6815bce commit e8817e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockdev.c
Expand Up @@ -730,7 +730,7 @@ DriveInfo *drive_init(QemuOpts *all_opts, BlockInterfaceType block_default_type)
&error_abort);
qemu_opts_absorb_qdict(legacy_opts, bs_opts, &local_err);
if (local_err) {
qerror_report_err(local_err);
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
goto fail;
}
Expand Down Expand Up @@ -942,7 +942,7 @@ DriveInfo *drive_init(QemuOpts *all_opts, BlockInterfaceType block_default_type)
dinfo = blockdev_init(filename, bs_opts, &local_err);
if (dinfo == NULL) {
if (local_err) {
qerror_report_err(local_err);
error_report("%s", error_get_pretty(local_err));
error_free(local_err);
}
goto fail;
Expand Down

0 comments on commit e8817e7

Please sign in to comment.