[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py |
Date: |
Thu, 26 Jul 2012 11:47:23 -0300 |
On Thu, 26 Jul 2012 14:12:50 +0200
Markus Armbruster <address@hidden> wrote:
> Luiz Capitulino <address@hidden> writes:
>
> > This script generates two files from qapi-schema-errors.json:
> >
> > o qapi-errors.h: contains error macro definitions, eg. QERR_BASE_NOT_FOUND,
> > corresponds to most of today's qerror.h
> >
> > o qapi-errors.c: contains the error table that currently exists in qerror.c
> [...]
> > diff --git a/scripts/qapi-errors.py b/scripts/qapi-errors.py
> > new file mode 100644
> > index 0000000..59cf426
> > --- /dev/null
> > +++ b/scripts/qapi-errors.py
> [...]
> > +def gen_error_def_table(exprs):
> > + ret = mcgen('''
> > +static const QErrorStringTable qerror_table[] = {
> > +''')
> > +
> > + for err in exprs:
> > + macro = gen_error_macro(err['error'])
> > + desc = err['description']
> > + ret += mcgen('''
> > + {
> > + .error_fmt = %(error_macro)s,
> > + .desc = "%(error_desc)s",
> > + },
> > +''',
>
> Trailing whitespace.
Fixed for v3.
[Qemu-devel] [PATCH 03/11] qerror: rename QERR_QMP_EXTRA_MEMBER, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 08/11] qapi: add qapi-schema-errors.json, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 04/11] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF_2, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 11/11] scripts: update check-qerror.sh, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 02/11] qerror: rename QERR_SOCK_CONNECT_IN_PROGRESS, Luiz Capitulino, 2012/07/25
[Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped, Luiz Capitulino, 2012/07/25