qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/22] qerror: expose a function to format an er


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 02/22] qerror: expose a function to format an error
Date: Mon, 7 Mar 2011 11:14:37 +0000

On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori <address@hidden> wrote:
> This will let Error share the QError human formatting.  This is only used for
> HMP.
>
> Signed-off-by: Anthony Liguori <address@hidden>
>
> diff --git a/qerror.c b/qerror.c
> index 4855604..13d53c9 100644
> --- a/qerror.c
> +++ b/qerror.c
> @@ -326,12 +326,18 @@ QError *qerror_from_info(const char *file, int linenr, 
> const char *func,
>     return qerr;
>  }
>
> -static void parse_error(const QError *qerror, int c)
> +static void parse_error(const QErrorStringTable *entry, int c)
>  {
> -    qerror_abort(qerror, "expected '%c' in '%s'", c, qerror->entry->desc);
> +#if 0
> +    qerror_abort(qerror, "expected '%c' in '%s'", c, entry->desc);
> +#else
> +    fprintf(stderr, "expected '%c' in '%s'", c, entry->desc);
> +    abort();
> +#endif

It is not obvious to me what these #if 0 are doing.  Was this just a
quick hack that needs to be fixed before merge?

Stefan



reply via email to

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