From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXYKm-0003KD-E1 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:57:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXYKg-000258-0C for qemu-devel@nongnu.org; Mon, 16 Mar 2015 12:57:44 -0400 From: Kevin Wolf Date: Mon, 16 Mar 2015 17:57:08 +0100 Message-Id: <1426525041-21926-5-git-send-email-kwolf@redhat.com> In-Reply-To: <1426525041-21926-1-git-send-email-kwolf@redhat.com> References: <1426525041-21926-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 04/17] block: Fix block-set-write-threshold not to use funky error class List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Markus Armbruster Error classes are a leftover from the days of "rich" error objects. New code should always use ERROR_CLASS_GENERIC_ERROR. Commit e246211 added a use of ERROR_CLASS_DEVICE_NOT_FOUND. Replace it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block/write-threshold.c | 2 +- qapi/block-core.json | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/block/write-threshold.c b/block/write-threshold.c index c2cd517..a53c1f5 100644 --- a/block/write-threshold.c +++ b/block/write-threshold.c @@ -112,7 +112,7 @@ void qmp_block_set_write_threshold(const char *node_name, bs = bdrv_find_node(node_name); if (!bs) { - error_set(errp, QERR_DEVICE_NOT_FOUND, node_name); + error_setg(errp, "Device '%s' not found", node_name); return; } diff --git a/qapi/block-core.json b/qapi/block-core.json index 90586a5..42c8850 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1961,10 +1961,6 @@ # @write-threshold: configured threshold for the block device, bytes. # Use 0 to disable the threshold. # -# Returns: Nothing on success -# If @node name is not found on the block device graph, -# DeviceNotFound -# # Since: 2.3 ## { 'command': 'block-set-write-threshold', -- 1.8.3.1