Statistics
| Branch: | Revision:

root / scripts / qapi.py @ f53ec699

History | View | Annotate | Download (7.8 kB)

# Date Author Comment
ea66c6d8 07/26/2013 10:10 pm Kevin Wolf

qapi.py: Maintain a list of union types

Signed-off-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>

69dd62df 07/26/2013 10:10 pm Kevin Wolf

qapi: Anonymous unions

The discriminator for anonymous unions is the data type. This allows to
have a union type that allows both of these:

{ 'file': 'my_existing_block_device_id' }
{ 'file': { 'filename': '/tmp/mydisk.qcow2', 'read-only': true } }...
bd9927fe 07/10/2013 08:39 pm Kevin Wolf

qapi.py: Avoid code duplication

The code that interprets the read JSON expression and appends types to
the respective global variables was duplicated. We can avoid that by
splitting off the part that reads from the file.

Signed-off-by: Kevin Wolf <>...

b35284ea 07/10/2013 08:39 pm Kevin Wolf

qapi.py: Allow top-level type reference for command definitions

If 'data' for a command definition isn't a dict, but a string, it is
taken as a (struct) type name and the fields of this struct are directly
used as parameters.

This is useful for transactionable commands that can use the same type...

c0afa9c5 05/23/2013 04:44 pm Michael Roth

qapi: qapi-types.py, native list support

Teach type generators about native types so they can generate the
appropriate linked list types.

Signed-off-by: Michael Roth <>
Reviewed-by: Laszlo Ersek <>
Reviewed-by: Amos Kong <>...

eda50a65 09/26/2012 04:45 pm Paolo Bonzini

qapi: do not protect enum values from namespace pollution

Enum values are always preceded by the uppercase name of the enum, so
they do not conflict with reserved words.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Luiz Capitulino <>

1057725f 09/26/2012 04:45 pm Paolo Bonzini

qapi: add "unix" to the set of reserved words

It is #defined to 1.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Luiz Capitulino <>

427a1a2c 08/09/2012 09:34 pm Blue Swirl

qapi: avoid reserved keywords

Clang compiler complained about use of reserved word 'restrict' in SLIRP
and QAPI.

Prefix C keywords with "q_", adjust SLIRP accordingly.

Reviewed-by: Markus Armbruster <>
Signed-off-by: Blue Swirl <>

e0d45df7 08/02/2012 12:09 am Luiz Capitulino

qapi: qapi.py: allow the "'" character to be escaped

Support escaping the escape character, and make more robust (don't die
for '', handle ' without matching '.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Peter Maydell <>...

c46f18ce 07/23/2012 01:55 pm Laszlo Ersek

qapi: generate C types for fixed-width integers

(Long line folded using parens:
<http://www.python.org/dev/peps/pep-0008/#maximum-line-length>.)

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

092705d4 07/23/2012 01:55 pm Laszlo Ersek

qapi: introduce "size" type

v1->v2:
- fall back to uint64 rather than int

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Stefan Hajnoczi <>

c9da228b 03/26/2012 09:21 pm Federico Simoncelli

qapi: add c_fun to escape function names

Signed-off-by: Federico Simoncelli <>
Signed-off-by: Anthony Liguori <>

d8e1f214 11/30/2011 05:28 pm Michael Roth

qapi: fix guardname generation

Fix a bug in handling dotted paths, and exclude directory prefixes
from generated guardnames to avoid odd/pseudo-random guardnames in
generated headers.

Signed-off-by: Anthony Liguori <>

776574d6 10/04/2011 05:00 pm Anthony Liguori

qapi: add code generation support for middle mode

To get the ball rolling merging QAPI, this patch introduces a "middle mode" to
the code generator. In middle mode, the code generator generates marshalling
functions that are compatible with the current QMP server. We absolutely need...

0f923be2 07/21/2011 10:48 pm Michael Roth

qapi: add qapi.py helper libraries

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>