Message ID | 1399996972-23429-3-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
On 05/13/2014 10:02 AM, Markus Armbruster wrote: > 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> > --- > blockdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Eric Blake <eblake@redhat.com>
diff --git a/blockdev.c b/blockdev.c index 24b1c3b..7478d4d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -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" @@ -1772,7 +1771,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)) {
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> --- blockdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)