aboutsummaryrefslogtreecommitdiff
path: root/docs/qapi-code-gen.txt
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-09-03 10:18:06 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-04 15:47:16 +0200
commit94a3f0af388820d74a9d89d1a856d2baa448c696 (patch)
treeb0aa7197d475e3152391fce0e6d0afb16006d06f /docs/qapi-code-gen.txt
parenteddf817bd823a90df209dfbdc2a0b2ec33b7cb77 (diff)
docs/qapi-code-gen.txt: Fix QAPI schema examples
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'docs/qapi-code-gen.txt')
-rw-r--r--docs/qapi-code-gen.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index b4d4a0176b..ff16df2456 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -300,7 +300,6 @@ an implicit C enum 'NameKind' is created, corresponding to the union
the union can be named 'max', as this would collide with the implicit
enum. The value for each branch can be of any type.
-
A flat union definition specifies a struct as its base, and
avoids nesting on the wire. All branches of the union must be
complex types, and the top-level fields of the union dictionary on
@@ -314,7 +313,7 @@ adding a common field 'readonly', renaming the discriminator to
something more applicable, and reducing the number of {} required on
the wire:
- { 'enum': 'BlockdevDriver', 'data': [ 'raw', 'qcow2' ] }
+ { 'enum': 'BlockdevDriver', 'data': [ 'file', 'qcow2' ] }
{ 'struct': 'BlockdevCommonOptions',
'data': { 'driver': 'BlockdevDriver', 'readonly': 'bool' } }
{ 'union': 'BlockdevOptions',
@@ -350,7 +349,7 @@ is identical on the wire to:
{ 'struct': 'Base', 'data': { 'type': 'Enum' } }
{ 'struct': 'Branch1', 'data': { 'data': 'str' } }
{ 'struct': 'Branch2', 'data': { 'data': 'int' } }
- { 'union': 'Flat': 'base': 'Base', 'discriminator': 'type',
+ { 'union': 'Flat', 'base': 'Base', 'discriminator': 'type',
'data': { 'one': 'Branch1', 'two': 'Branch2' } }