qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 05/11] qerror: add new error message for invalid


From: Luiz Capitulino
Subject: [Qemu-devel] Re: [PATCH 05/11] qerror: add new error message for invalid enum values
Date: Mon, 14 Mar 2011 16:19:37 -0300

On Fri, 11 Mar 2011 15:00:43 -0600
Anthony Liguori <address@hidden> wrote:

> Signed-off-by: Anthony Liguori <address@hidden>
> 
> diff --git a/qerror.c b/qerror.c
> index 78d3884..5a1e637 100644
> --- a/qerror.c
> +++ b/qerror.c
> @@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = {
>          .desc      = "Duplicate ID '%(id)' for %(object)",
>      },
>      {
> +        .error_fmt = QERR_ENUM_VALUE_INVALID,
> +        .desc      = "Enum value '%(value)' is invalid for type '%(type)'",
> +    },

This doesn't seem to be used.

> +    {
>          .error_fmt = QERR_FD_NOT_FOUND,
>          .desc      = "File descriptor named '%(name)' not found",
>      },
> diff --git a/qerror.h b/qerror.h
> index 495d0a4..35e7253 100644
> --- a/qerror.h
> +++ b/qerror.h
> @@ -98,6 +98,9 @@ void qerror_set_desc(QError *qerr, const char *fmt);
>  #define QERR_DUPLICATE_ID \
>      "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }"
>  
> +#define QERR_ENUM_VALUE_INVALID \
> +    "{ 'class': 'EnumValueInvalid', 'data': { 'type': %s, 'value': %s } }"
> +
>  #define QERR_FD_NOT_FOUND \
>      "{ 'class': 'FdNotFound', 'data': { 'name': %s } }"
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]