From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJmoJ-0006pJ-Is for qemu-devel@nongnu.org; Fri, 06 Feb 2015 12:35:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJmoI-0005cz-DA for qemu-devel@nongnu.org; Fri, 06 Feb 2015 12:35:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJmoI-0005cv-6T for qemu-devel@nongnu.org; Fri, 06 Feb 2015 12:35:18 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t16HZHqq023578 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 6 Feb 2015 12:35:17 -0500 From: Kevin Wolf Date: Fri, 6 Feb 2015 18:35:04 +0100 Message-Id: <1423244107-21403-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1423244107-21403-1-git-send-email-kwolf@redhat.com> References: <1423244107-21403-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL v2 44/47] 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 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 Reviewed-by: Eric Blake Message-id: 1422524221-8566-3-git-send-email-armbru@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- 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 eeaf0cb..85f1699 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.8.3.1