Skip to content

Commit

Permalink
qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
crobinso authored and Luiz Capitulino committed Apr 25, 2014
1 parent f231b88 commit 0b15abf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blockjob.c
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions include/qapi/qmp/qerror.h
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion stubs/arch-query-cpu-def.c
Expand Up @@ -4,6 +4,6 @@

CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)
{
error_set(errp, QERR_NOT_SUPPORTED);
error_set(errp, QERR_UNSUPPORTED);
return NULL;
}

0 comments on commit 0b15abf

Please sign in to comment.