Statistics
| Branch: | Revision:

root / qapi @ 06aac7bd

Latest revisions

# Date Author Comment
ccff63ca 12/06/2012 10:17 am Eduardo Habkost

qapi/qmp-registry.c: Include headers it needs

Include:
- <glib.h> for g_malloc0()
- <string.h> for strcmp()

Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h....

1d162526 11/29/2012 03:05 pm Bruce Rogers

qapi: fix qapi_dealloc_type_size parameter type

The second parameter to qapi_dealloc_type_size should be a uint64_t *,
not a size_t *. This was causing our 32 bit x86 build to fail, since
warnings are treated as errors.

Signed-off-by: Bruce Rogers <>...

0c26f2ec 11/26/2012 10:25 pm Stefan Hajnoczi

qapi: handle visitor->type_size() in QapiDeallocVisitor

visit_type_size() requires either visitor->type_size() or
visitor_uint64() to be implemented, otherwise a NULL function pointer is
invoked.

It is possible to trigger this crash as follows:

$ qemu-system-x86_64 -netdev tap,sndbuf=0,id=netdev0 \...
63186e56 10/30/2012 10:30 am Paolo Bonzini

build: opts-visitor is not really part of QAPI

It is only used by QEMU itself, do not build it into the tests.

Signed-off-by: Paolo Bonzini <>

e36c8766 08/20/2012 05:05 pm Stefan Weil

qapi: Fix memory leak

valgrind report:

24534 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601
24534 at 0x4824F20: malloc (vg_replace_malloc.c:236)
24534 by 0x293C88: malloc_and_trace (vl.c:2281)
24534 by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1)...
93b91c59 08/13/2012 08:17 pm Luiz Capitulino

qemu-ga: switch to the new error format on the wire

IMPORTANT: this BREAKS qemu-ga compatibility for the error response.

Instead of returning something like:

{ "error": { "class": "InvalidParameterValue",
"data": {"name": "mode", "expected": "halt|powerdown|reboot" } } }...

7795b166 08/13/2012 08:17 pm Luiz Capitulino

error: drop error_get_qobject()/error_set_qobject()

error_get_qobject() is unused since last commit, error_set_qobject()
has never been used. Also drops error_int.h.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>

d195325b 07/23/2012 01:55 pm Paolo Bonzini

qapi: fix error propagation

Don't overwrite / leak previously set errors.
Make traversal cope with missing mandatory sub-structs.
Don't try to end a container that could not be started.

v1->v2:
- unchanged

v2->v3:
- instead of examining, assert that we never overwrite errors with...

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 <>

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

qapi: introduce OptsVisitor

This visitor supports parsing

-option [type=]discriminator[,optarg1=val1][,optarg2=val2][,...]

style QemuOpts objects into "native" C structures. After defining the type
tree in the qapi schema (see below), a root type traversal with this...

View revisions

Also available in: Atom