]> git.proxmox.com Git - mirror_qemu.git/commitdiff
block: Fix block-set-write-threshold not to use funky error class
authorMarkus Armbruster <armbru@redhat.com>
Fri, 13 Mar 2015 17:51:38 +0000 (18:51 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 16 Mar 2015 16:07:25 +0000 (17:07 +0100)
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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/write-threshold.c
qapi/block-core.json

index c2cd51771614cbe37f78c3595c6cb9928935a969..a53c1f5e651519b99dee77423bf649a3e799c76e 100644 (file)
@@ -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;
     }
 
index 90586a59499462d26b6446cbeabdd535ad87db5f..42c885047f451976d0dd1ced0db52e8f3b3ea1ad 100644 (file)
 # @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',