aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-08-06 15:55:22 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2012-08-13 13:21:37 -0300
commitab878ddfeee722db8e7f78a9c6e9882864c2fd66 (patch)
tree26769ff103465cb3ef06bb2e8620e066126ad0c3
parentea25fbca88b223877c45c776b6c0e17e0247439f (diff)
downloadqemu-ab878ddfeee722db8e7f78a9c6e9882864c2fd66.zip
qemu-ab878ddfeee722db8e7f78a9c6e9882864c2fd66.tar.gz
qemu-ab878ddfeee722db8e7f78a9c6e9882864c2fd66.tar.bz2
hmp: hmp_change(): use error_get_class()
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>
-rw-r--r--hmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hmp.c b/hmp.c
index 54c37d7..9b44dfc 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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;