qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
authorCole Robinson <crobinso@redhat.com>
Fri, 21 Mar 2014 23:42:27 +0000 (19:42 -0400)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 25 Apr 2014 13:19:59 +0000 (09:19 -0400)
The former is only used twice, the latter is used over 30 times, and
has a nicer error message.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
blockjob.c
include/qapi/qmp/qerror.h
stubs/arch-query-cpu-def.c

index b3ce14cebd5dc9b28277613c4b7200be010d488e..cd4784f053078315a8abe0656746631380676c29 100644 (file)
@@ -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);
index 01d1d0661c607ace1c5d3831e5c79eeab851f6b7..f5335e67d6d2fe753df701b8b59d578c07837470 100644 (file)
@@ -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"
 
index fa6789598acfa9c196f08fbd55429248d4c29d07..22e0b43de947be93eaec93dd5a8deba705545a27 100644 (file)
@@ -4,6 +4,6 @@
 
 CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
 {
-    error_set(errp, QERR_NOT_SUPPORTED);
+    error_set(errp, QERR_UNSUPPORTED);
     return NULL;
 }