diff options
| author | Peter Maydell | 2014-09-29 19:18:28 +0200 |
|---|---|---|
| committer | Peter Maydell | 2014-09-29 19:18:29 +0200 |
| commit | b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf (patch) | |
| tree | df518fd99409be22df46188174833b5fd317be5f /qapi/qapi-visit-core.c | |
| parent | libqos: use microseconds instead of iterations for virtio timeout (diff) | |
| parent | Add HMP command "info memory-devices" (diff) | |
| download | qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.tar.gz qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.tar.xz qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.zip | |
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
Add HMP command "info memory-devices"
qemu-socket: Eliminate silly QERR_ macros
qemu-socket: Polish errors for connect() and listen() failure
qemu-iotests: Test missing "driver" key for blockdev-add
tests: add QMP input visitor test for unions with no discriminator
qapi: dealloc visitor, implement visit_start_union
qapi: add visit_start_union and visit_end_union
virtio-balloon: fix integer overflow in memory stats feature
monitor: Reset HMP mon->rs in CHR_EVENT_OPEN
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qapi/qapi-visit-core.c')
| -rw-r--r-- | qapi/qapi-visit-core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 55f8d4068c..b66b93ae2b 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -58,6 +58,21 @@ void visit_end_list(Visitor *v, Error **errp) v->end_list(v, errp); } +bool visit_start_union(Visitor *v, bool data_present, Error **errp) +{ + if (v->start_union) { + return v->start_union(v, data_present, errp); + } + return true; +} + +void visit_end_union(Visitor *v, bool data_present, Error **errp) +{ + if (v->end_union) { + v->end_union(v, data_present, errp); + } +} + void visit_optional(Visitor *v, bool *present, const char *name, Error **errp) { |
