From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzI-00034X-L9 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 1YJGzF-000456-4b for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJGzE-00044v-Sw for qemu-devel@nongnu.org; Thu, 05 Feb 2015 02:36:29 -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 t157aSYO028966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 02:36:28 -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 t157aQjZ022913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 5 Feb 2015 02:36:27 -0500 From: Markus Armbruster Date: Thu, 5 Feb 2015 08:36:23 +0100 Message-Id: <1423121783-1806-10-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 9/9] balloon: Eliminate silly QERR_ macros List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up the balloon ones. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- balloon.c | 6 ++++-- include/qapi/qmp/qerror.h | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/balloon.c b/balloon.c index 728bb70..dea19a4 100644 --- a/balloon.c +++ b/balloon.c @@ -39,11 +39,13 @@ static void *balloon_opaque; static bool have_ballon(Error **errp) { if (kvm_enabled() && !kvm_has_sync_mmu()) { - error_set(errp, QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon"); + error_set(errp, ERROR_CLASS_KVM_MISSING_CAP, + "Using KVM without synchronous MMU, balloon unavailable"); return false; } if (!balloon_event_fn) { - error_set(errp, QERR_DEVICE_NOT_ACTIVE, "balloon"); + error_set(errp, ERROR_CLASS_DEVICE_NOT_ACTIVE, + "No balloon device has been activated"); return false; } return true; diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 28f980e..eeaf0cb 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -70,9 +70,6 @@ void qerror_report_err(Error *err); #define QERR_DEVICE_NO_HOTPLUG \ ERROR_CLASS_GENERIC_ERROR, "Device '%s' does not support hotplugging" -#define QERR_DEVICE_NOT_ACTIVE \ - ERROR_CLASS_DEVICE_NOT_ACTIVE, "No %s device has been activated" - #define QERR_DEVICE_NOT_ENCRYPTED \ ERROR_CLASS_GENERIC_ERROR, "Device '%s' is not encrypted" @@ -109,9 +106,6 @@ void qerror_report_err(Error *err); #define QERR_JSON_PARSING \ ERROR_CLASS_GENERIC_ERROR, "Invalid JSON syntax" -#define QERR_KVM_MISSING_CAP \ - ERROR_CLASS_KVM_MISSING_CAP, "Using KVM without %s, %s unavailable" - #define QERR_MIGRATION_ACTIVE \ ERROR_CLASS_GENERIC_ERROR, "There's a migration process in progress" -- 1.9.3