From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzI-00034Q-4O for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJGzD-00044c-99 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzD-000443-1P for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:27 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t157aQoS002178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 02:36:26 -0500 Received: from blackfin.pond.sub.org (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t157aOwT022892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 5 Feb 2015 02:36:25 -0500 From: Markus Armbruster Date: Thu, 5 Feb 2015 08:36:16 +0100 Message-Id: <1423121783-1806-3-git-send-email-armbru@redhat.com> In-Reply-To: <1423121783-1806-1-git-send-email-armbru@redhat.com> References: <1423121783-1806-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 2/9] qmp hmp: Improve error messages when SPICE is not in use List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Reviewed-by: Eric Blake Reviewed-by: Gerd Hoffmann --- 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 db7926d..762e063 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 bool 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 false; } return true; -- 1.9.3