qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 27/35] hmp: hmp_change(): use error_get_class()


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 27/35] hmp: hmp_change(): use error_get_class()
Date: Tue, 7 Aug 2012 12:53:38 -0300

The error_is_type() function is going to be dropped.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 hmp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hmp.c b/hmp.c
index 3a9688d..5900251 100644
--- a/hmp.c
+++ b/hmp.c
@@ -799,7 +799,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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]