From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PULL 1/5] docs/devel/qapi-code-gen: Fix up examples
Date: Mon, 9 Nov 2020 10:02:16 +0100 [thread overview]
Message-ID: <20201109090220.825764-2-armbru@redhat.com> (raw)
In-Reply-To: <20201109090220.825764-1-armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201027121026.3025930-1-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
docs/devel/qapi-code-gen.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
index c6438c6aa9..6906a06ad2 100644
--- a/docs/devel/qapi-code-gen.txt
+++ b/docs/devel/qapi-code-gen.txt
@@ -393,7 +393,7 @@ is identical on the wire to:
{ 'enum': 'Enum', 'data': ['one', 'two'] }
{ 'struct': 'Branch1', 'data': { 'data': 'str' } }
{ 'struct': 'Branch2', 'data': { 'data': 'int' } }
- { 'union': 'Flat': 'base': { 'type': 'Enum' }, 'discriminator': 'type',
+ { 'union': 'Flat', 'base': { 'type': 'Enum' }, 'discriminator': 'type',
'data': { 'one': 'Branch1', 'two': 'Branch2' } }
The optional 'if' member specifies a conditional. See "Configuring
@@ -590,6 +590,8 @@ When in doubt, do not implement OOB execution support.
Member 'allow-preconfig' declares whether the command is available
before the machine is built. It defaults to false. For example:
+ { 'enum': 'QMPCapability',
+ 'data': [ 'oob' ] }
{ 'command': 'qmp_capabilities',
'data': { '*enable': [ 'QMPCapability' ] },
'allow-preconfig': true }
@@ -824,7 +826,7 @@ Example: a struct with conditional feature 'allow-negative-numbers'
{ 'struct': 'TestType',
'data': { 'number': 'int' },
'features': [ { 'name': 'allow-negative-numbers',
- 'if' 'defined(IFCOND)' } ] }
+ 'if': 'defined(IFCOND)' } ] }
Please note that you are responsible to ensure that the C code will
compile with an arbitrary combination of conditions, since the
--
2.26.2
next prev parent reply other threads:[~2020-11-09 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 9:02 [PULL 0/5] QAPI patches patches for 2020-11-09 Markus Armbruster
2020-11-09 9:02 ` Markus Armbruster [this message]
2020-11-09 9:02 ` [PULL 2/5] MAINTAINERS: Add QAPI schema modules to their subsystems Markus Armbruster
2020-11-09 9:02 ` [PULL 3/5] qapi: Fix missing headers in QMP Reference Manual Markus Armbruster
2020-11-09 9:02 ` [PULL 4/5] qapi/block-core: Improve MapEntry documentation Markus Armbruster
2020-11-09 9:02 ` [PULL 5/5] block: Remove unused BlockDeviceMapEntry Markus Armbruster
2020-11-09 16:07 ` [PULL 0/5] QAPI patches patches for 2020-11-09 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201109090220.825764-2-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).