From: Luiz Capitulino Date: Mon, 6 Aug 2012 18:55:22 +0000 (-0300) Subject: hmp: hmp_change(): use error_get_class() X-Git-Tag: qemu-xen-4.3.0-rc1~745^2~21 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ab878ddfeee722db8e7f78a9c6e9882864c2fd66;p=qemu-upstream-4.5-testing.git hmp: hmp_change(): use error_get_class() The error_is_type() function is going to be dropped. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- diff --git a/hmp.c b/hmp.c index 54c37d725..9b44dfcf3 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;