Statistics
| Branch: | Revision:

root / qapi @ 1ab516ed

Latest revisions

# Date Author Comment
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...

94c3db85 07/13/2012 07:46 pm Luiz Capitulino

qapi: input_type_enum(): fix error message

The enum string is pointed to by 'enum_str' not 'name'. This bug
causes the error message to be:

{ "error": { "class": "InvalidParameter",
"desc": "Invalid parameter 'null'",
"data": { "name": "null" } } }...

ad608da5 06/15/2012 04:41 pm Paolo Bonzini

qmp: do not include monitor.h from qapi-types-core.h

The comment is stale, monitor.h is not needed anymore (only qerror.h
is, because it contains the schema for errors).

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

4e27e819 06/08/2012 05:11 pm Michael Roth

qapi: Add Visitor interfaces for uint*_t and int*_t

This adds visitor interfaces for fixed-width integers types.
Implementing these in visitors is optional, otherwise we fall back to
visit_type_int() (int64_t) with some additional bounds checking to avoid...

173bbb75 06/08/2012 05:11 pm Michael Roth

qapi: String visitor, use %f representation for floats

Currently string-output-visitor formats floats as %g, which is nice in
that trailing 0's are automatically truncated, but otherwise this causes
some issues:

- it uses 6 significant figures instead of 6 decimal places, which...

View revisions

Also available in: Atom