[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 32/33] docs/qapi-code-gen.txt: Fix QAPI schema exampl
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 32/33] docs/qapi-code-gen.txt: Fix QAPI schema examples |
Date: |
Fri, 4 Sep 2015 16:21:39 +0200 |
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
docs/qapi-code-gen.txt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index b4d4a01..ff16df2 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' } }
--
2.4.3
- [Qemu-devel] [PULL 12/33] tests/qapi-schema: Document alternate's enum lacks visit function, (continued)
- [Qemu-devel] [PULL 12/33] tests/qapi-schema: Document alternate's enum lacks visit function, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 16/33] qapi: Document flaws in checking of names, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 30/33] qapi: Fix errors for non-string, non-dictionary members, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 29/33] tests/qapi-schema: Cover non-string, non-dictionary members, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 24/33] qapi-commands: Don't feed output of mcgen() to mcgen() again, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 28/33] tests/qapi-schema: Cover two more syntax errors, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 19/33] qapi-tests: New tests for union, alternate command arguments, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 09/33] qapi-visit: Fix generated code when schema has forward refs, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 21/33] qapi: Command returning anonymous type doesn't work, outlaw, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 20/33] qapi: Fix to reject union command and event arguments, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 32/33] docs/qapi-code-gen.txt: Fix QAPI schema examples,
Markus Armbruster <=
- [Qemu-devel] [PULL 33/33] qapi: Generators crash when --output-dir isn't given, fix, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 31/33] qapi: Simplify error reporting for array types, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 10/33] qapi-visit: Replace list implicit_structs by set, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 17/33] tests/qapi-schema: Restore test case for flat union base bug, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 26/33] qapi: Generated code cleanup, Markus Armbruster, 2015/09/04
- [Qemu-devel] [PULL 18/33] tests/qapi-schema: Rename tests from data- to args-, Markus Armbruster, 2015/09/04
- Re: [Qemu-devel] [PULL 00/33] qapi: Another round of fixes and cleanups, Peter Maydell, 2015/09/04