From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR95O-0000X5-Bn for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR95H-0002QV-V3 for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR95H-0002QP-Kx for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:43 -0400 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 s2LNggdf011229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Mar 2014 19:42:43 -0400 From: Cole Robinson Date: Fri, 21 Mar 2014 19:42:27 -0400 Message-Id: <08bc0deb8fb1d1e96df3d14e377cdc948d9c0660.1395445063.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH v2 8/9] qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luiz Capitulino , Markus Armbruster , Cole Robinson The former is only used twice, the latter is used over 30 times, and has a nicer error message. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson --- blockjob.c | 2 +- include/qapi/qmp/qerror.h | 3 --- stubs/arch-query-cpu-def.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/blockjob.c b/blockjob.c index b3ce14c..cd4784f 100644 --- a/blockjob.c +++ b/blockjob.c @@ -88,7 +88,7 @@ void block_job_set_speed(BlockJob *job, int64_t speed, Error **errp) Error *local_err = NULL; if (!job->driver->set_speed) { - error_set(errp, QERR_NOT_SUPPORTED); + error_set(errp, QERR_UNSUPPORTED); return; } job->driver->set_speed(job, speed, &local_err); diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 01d1d06..f5335e6 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -122,9 +122,6 @@ void qerror_report_err(Error *err); #define QERR_MISSING_PARAMETER \ ERROR_CLASS_GENERIC_ERROR, "Parameter '%s' is missing" -#define QERR_NOT_SUPPORTED \ - ERROR_CLASS_GENERIC_ERROR, "Not supported" - #define QERR_PERMISSION_DENIED \ ERROR_CLASS_GENERIC_ERROR, "Insufficient permission to perform this operation" diff --git a/stubs/arch-query-cpu-def.c b/stubs/arch-query-cpu-def.c index fa67895..22e0b43 100644 --- a/stubs/arch-query-cpu-def.c +++ b/stubs/arch-query-cpu-def.c @@ -4,6 +4,6 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp) { - error_set(errp, QERR_NOT_SUPPORTED); + error_set(errp, QERR_UNSUPPORTED); return NULL; } -- 1.8.5.3