qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 2/9] qmp hmp: Improve error messages when SPICE is n


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH 2/9] qmp hmp: Improve error messages when SPICE is not in use
Date: Tue, 13 Jan 2015 18:50:25 +0100

Commit 7572150 adopted QERR_DEVICE_NOT_ACTIVE for the purpose,
probably because adding another error seemed cumbersome overkill.
Produces "No spice device has been activated", which is awkward.

We've since abandoned our quest for "rich" error objects.  Time to
undo the damage to this error message.  Replace it by "SPICE is not in
use".

Keep the stupid DeviceNotActive ErrorClass for compatibility, even
though Libvirt doesn't use it.

Signed-off-by: Markus Armbruster <address@hidden>
---
 include/ui/qemu-spice.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index b3f2679..99bb622 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -91,8 +91,8 @@ static inline int qemu_spice_display_add_client(int csock, 
int skipauth,
 static inline int qemu_using_spice(Error **errp)
 {
     if (!using_spice) {
-        /* correct one? spice isn't a device ,,, */
-        error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice");
+        error_set(errp, ERROR_CLASS_DEVICE_NOT_ACTIVE,
+                  "SPICE is not in use");
         return 0;
     }
     return 1;
-- 
1.9.3




reply via email to

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