From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T10dY-0001Iv-W6 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:49:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T10dW-0003sc-SH for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:49:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T10dW-0003sW-LD for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:49:14 -0400 From: Luiz Capitulino Date: Mon, 13 Aug 2012 16:48:48 -0300 Message-Id: <1344887349-13041-28-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1344887349-13041-1-git-send-email-lcapitulino@redhat.com> References: <1344887349-13041-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 27/48] hmp: hmp_change(): use error_get_class() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org The error_is_type() function is going to be dropped. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 1.7.11.2.249.g31c7954.dirty