aboutsummaryrefslogtreecommitdiff
path: root/docs/devel
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-23 22:28:58 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-03-23 22:28:58 +0000
commit266469947161aa10b1d36843580d369d5aa38589 (patch)
treea7c31491b7f1bd3540822c7350308ad44ece7ad9 /docs/devel
parent1a4d83b5643e8e965cbc16950f78066a7cd27cb4 (diff)
parentbdabafc6836edc0f34732cac473899cb4e77a296 (diff)
downloadqemu-266469947161aa10b1d36843580d369d5aa38589.zip
qemu-266469947161aa10b1d36843580d369d5aa38589.tar.gz
qemu-266469947161aa10b1d36843580d369d5aa38589.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-03-23' into staging
QAPI patches patches for 2021-03-23 # gpg: Signature made Tue 23 Mar 2021 21:37:53 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2021-03-23: (29 commits) block: Remove monitor command block_passwd qapi: Enforce union and alternate branch naming rules qapi: Enforce enum member naming rules qapi: Enforce struct member naming rules tests/qapi-schema: Switch member name clash test to struct qapi: Enforce command naming rules qapi: Enforce feature naming rules qapi: Prepare for rejecting underscore in command and member names tests-qmp-cmds: Drop unused and incorrect qmp_TestIfCmd() qapi/pragma: Streamline comments on member-name-exceptions qapi: Rename pragma *-whitelist to *-exceptions tests/qapi-schema: Rename returns-whitelist to returns-bad-type tests/qapi-schema: Rename pragma-*-crap to pragma-value-not-* qapi: Factor out QAPISchemaParser._check_pragma_list_of_str() tests/qapi-schema: Rename redefined-builtin to redefined-predefined qapi: Enforce type naming rules qapi: Enforce event naming rules qapi: Consistently permit any case in downstream prefixes qapi: Move uppercase rejection to check_name_lower() qapi: Rework name checking in preparation of stricter checking ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/devel')
-rw-r--r--docs/devel/qapi-code-gen.txt28
1 files changed, 17 insertions, 11 deletions
diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt
index 6906a06..c1cb6f9 100644
--- a/docs/devel/qapi-code-gen.txt
+++ b/docs/devel/qapi-code-gen.txt
@@ -147,9 +147,11 @@ prevent incomplete include files.
=== Pragma directives ===
Syntax:
- PRAGMA = { 'pragma': { '*doc-required': BOOL,
- '*returns-whitelist': [ STRING, ... ],
- '*name-case-whitelist': [ STRING, ... ] } }
+ PRAGMA = { 'pragma': {
+ '*doc-required': BOOL,
+ '*command-name-exceptions': [ STRING, ... ],
+ '*command-returns-exceptions': [ STRING, ... ],
+ '*member-name-exceptions': [ STRING, ... ] } }
The pragma directive lets you control optional generator behavior.
@@ -159,11 +161,15 @@ pragma to different values in parts of the schema doesn't work.
Pragma 'doc-required' takes a boolean value. If true, documentation
is required. Default is false.
-Pragma 'returns-whitelist' takes a list of command names that may
+Pragma 'command-name-exceptions' takes a list of commands whose names
+may contain '_' instead of '-'. Default is none.
+
+Pragma 'command-returns-exceptions' takes a list of commands that may
violate the rules on permitted return types. Default is none.
-Pragma 'name-case-whitelist' takes a list of names that may violate
-rules on use of upper- vs. lower-case letters. Default is none.
+Pragma 'member-name-exceptions' takes a list of types whose member
+names may contain uppercase letters, and '_' instead of '-'. Default
+is none.
=== Enumeration types ===
@@ -490,9 +496,9 @@ are the arguments. A union type requires 'boxed': true.
Member 'returns' defines the command's return type. It defaults to an
empty struct type. It must normally be a complex type or an array of
a complex type. To return anything else, the command must be listed
-in pragma 'returns-whitelist'. If you do this, extending the command
-to return additional information will be harder. Use of
-'returns-whitelist' for new commands is strongly discouraged.
+in pragma 'commands-returns-exceptions'. If you do this, extending
+the command to return additional information will be harder. Use of
+the pragma for new commands is strongly discouraged.
A command's error responses are not specified in the QAPI schema.
Error conditions should be documented in comments.
@@ -755,8 +761,8 @@ Any name (command, event, type, member, or enum value) beginning with
"x-" is marked experimental, and may be withdrawn or changed
incompatibly in a future release.
-Pragma 'name-case-whitelist' lets you violate the rules on use of
-upper and lower case. Use for new code is strongly discouraged.
+Pragmas 'command-name-exceptions' and 'member-name-exceptions' let you
+violate naming rules. Use for new code is strongly discouraged.
=== Downstream extensions ===