[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/16] qerror.h: Replace QERR_NOT_SUPPORTED with QERR
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 08/16] qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED |
Date: |
Fri, 25 Apr 2014 14:29:39 -0400 |
From: Cole Robinson <address@hidden>
The former is only used twice, the latter is used over 30 times, and
has a nicer error message.
Cc: Luiz Capitulino <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: Cole Robinson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
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.9.0
- [Qemu-devel] [PULL 00/16] QMP queue, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 05/16] error: Print error_report() to stderr if using qmp, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 14/16] HMP: fix doc of dump-guest-memory, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 06/16] qerror.h: Remove unused error classes, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 07/16] qerror.h: Remove QERR defines that are only used once, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 15/16] HMP: support specifying dump format for dump-guest-memory, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 16/16] monitor: fix qmp_getfd() fd leak in error case, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 13/16] qmp: object-add: Validate class before creating object, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 08/16] qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED,
Luiz Capitulino <=
- [Qemu-devel] [PULL 09/16] error: Remove some unused headers, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 12/16] monitor: Add device_add and device_del completion., Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 11/16] monitor: Add command_completion callback to mon_cmd_t., Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 02/16] vnc: Remove default_mon usage, Luiz Capitulino, 2014/04/25
- [Qemu-devel] [PULL 10/16] monitor: Fix drive_del id argument type completion., Luiz Capitulino, 2014/04/25
- Re: [Qemu-devel] [PULL 00/16] QMP queue, Peter Maydell, 2014/04/28