From bacc2236309db4099bbbfe7125efaa7ad83739d8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 1 Dec 2017 03:12:21 +0100 Subject: [PATCH 09/36] blockdev: Report proper error class in __com.redhat.drive_del RH-Author: Eric Blake Message-id: <20171201031221.26738-1-eblake@redhat.com> Patchwork-id: 78060 O-Subject: [RHEV-7.5 qemu-kvm-rhev PATCH] blockdev: Report proper error class in __com.redhat.drive_del Bugzilla: 1487515 RH-Acked-by: Markus Armbruster RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Jeffrey Cody From: Eric Blake Signed-off-by: Miroslav Rezanina --- blockdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 0f063ec..6a37934 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2909,7 +2909,8 @@ void qmp___com_redhat_drive_del(const char *id, Error **errp) blk = blk_by_name(id); if (!blk) { - error_setg(errp, "Device '%s' not found", id); + error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, + "Device '%s' not found", id); return; } -- 1.8.3.1