Skip to content

Commit

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

do_drive_del() is an HMP command that won't be converted to QMP (we'll
create a new QMP command instead).  It uses both qerror_report() 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 e8817e7 commit b1422f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions blockdev.c
Expand Up @@ -34,7 +34,6 @@
#include "hw/block/block.h"
#include "block/blockjob.h"
#include "monitor/monitor.h"
#include "qapi/qmp/qerror.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/qmp/types.h"
Expand Down Expand Up @@ -1763,7 +1762,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)

bs = bdrv_find(id);
if (!bs) {
qerror_report(QERR_DEVICE_NOT_FOUND, id);
error_report("Device '%s' not found", id);
return -1;
}
if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_DRIVE_DEL, &local_err)) {
Expand Down

0 comments on commit b1422f2

Please sign in to comment.