From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPBH-0002ax-Pt for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:44:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBPBE-0002M6-G6 for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:44:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60638) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBPBE-0002LN-8o for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:44:20 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0EEiJx0014778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 14 Jan 2015 09:44:19 -0500 From: Markus Armbruster Date: Wed, 14 Jan 2015 15:31:48 +0100 Message-Id: <1421245910-30666-3-git-send-email-armbru@redhat.com> In-Reply-To: <1421245910-30666-1-git-send-email-armbru@redhat.com> References: <1421245910-30666-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] blockdev: Eliminate silly QERR_BLOCK_JOB_NOT_ACTIVE macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com From: Markus Armbruster 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 this one up. Signed-off-by: Markus Armbruster --- blockdev.c | 3 ++- include/qapi/qmp/qerror.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 8d6ca35..287d7af 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2674,7 +2674,8 @@ static BlockJob *find_block_job(const char *device, AioContext **aio_context, return bs->job; notfound: - error_set(errp, QERR_BLOCK_JOB_NOT_ACTIVE, device); + error_set(errp, ERROR_CLASS_DEVICE_NOT_ACTIVE, + "No active block job on device '%s'", device); *aio_context = NULL; return NULL; } diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 0ca6cbd..becdca6 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -37,9 +37,6 @@ void qerror_report_err(Error *err); #define QERR_BASE_NOT_FOUND \ ERROR_CLASS_GENERIC_ERROR, "Base '%s' not found" -#define QERR_BLOCK_JOB_NOT_ACTIVE \ - ERROR_CLASS_DEVICE_NOT_ACTIVE, "No active block job on device '%s'" - #define QERR_BLOCK_JOB_NOT_READY \ ERROR_CLASS_GENERIC_ERROR, "The active block job for device '%s' cannot be completed" -- 1.9.3