Commit 6ec46ad5 authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf
Browse files

block: Fix block-set-write-threshold not to use funky error class



Error classes are a leftover from the days of "rich" error objects.
New code should always use ERROR_CLASS_GENERIC_ERROR.  Commit e2462113
added a use of ERROR_CLASS_DEVICE_NOT_FOUND.  Replace it.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent a1f688f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

+0 −4
Original line number Diff line number Diff line
@@ -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',