Skip to content

Commit

Permalink
hmp: hmp_change(): use error_get_class()
Browse files Browse the repository at this point in the history
The error_is_type() function is going to be dropped.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
Luiz Capitulino committed Aug 13, 2012
1 parent ea25fbc commit ab878dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hmp.c
Expand Up @@ -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;
Expand Down

0 comments on commit ab878dd

Please sign in to comment.