On Mon, Mar 7, 2011 at 1:22 AM, Anthony Liguori <aligu...@us.ibm.com> wrote: > This will let Error share the QError human formatting. This is only used for > HMP. > > Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> > > 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