Commit ab878ddf authored by Luiz Capitulino's avatar Luiz Capitulino
Browse files

hmp: hmp_change(): use error_get_class()



The error_is_type() function is going to be dropped.

Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
parent ea25fbca
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -793,7 +793,8 @@ void hmp_change(Monitor *mon, const QDict *qdict)
    }

    qmp_change(device, target, !!arg, arg, &err);
    if (error_is_type(err, QERR_DEVICE_ENCRYPTED)) {
    if (error_is_set(&err) &&
        error_get_class(err) == ERROR_CLASS_DEVICE_ENCRYPTED) {
        error_free(err);
        monitor_read_block_device_key(mon, device, NULL, NULL);
        return;