qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, eblake@redhat.com,
	mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH v2 for-2.9 24/47] qapi2texi: Implement boxed argument documentation
Date: Wed, 15 Mar 2017 13:57:13 +0100	[thread overview]
Message-ID: <1489582656-31133-25-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1489582656-31133-1-git-send-email-armbru@redhat.com>

This replaces manual references like "For the arguments, see the
documentation of ..." by a generated reference "Arguments: the members
of ...".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
 qapi-schema.json     |  2 +-
 qapi/block-core.json | 10 ----------
 scripts/qapi2texi.py |  8 +++++++-
 3 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index d693033..1d7b1cd 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1017,7 +1017,7 @@
 ##
 # @migrate-set-parameters:
 #
-# Set various migration parameters.  See MigrationParameters for details.
+# Set various migration parameters.
 #
 # Since: 2.4
 #
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1be1ec5..0f132fc 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1341,8 +1341,6 @@
 # The operation can be stopped before it has completed using the
 # block-job-cancel command.
 #
-# For the arguments, see the documentation of DriveBackup.
-#
 # Returns: nothing on success
 #          If @device is not a valid block device, GenericError
 #
@@ -1369,8 +1367,6 @@
 # The operation can be stopped before it has completed using the
 # block-job-cancel command.
 #
-# For the arguments, see the documentation of BlockdevBackup.
-#
 # Returns: nothing on success
 #          If @device is not a valid block device, DeviceNotFound
 #
@@ -1458,8 +1454,6 @@
 # format of the mirror image, default is to probe if mode='existing',
 # else the format of the source.
 #
-# See DriveMirror for parameter descriptions
-#
 # Returns: nothing on success
 #          If @device is not a valid block device, GenericError
 #
@@ -1731,8 +1725,6 @@
 # the device will be removed from its group and the rest of its
 # members will not be affected. The 'group' parameter is ignored.
 #
-# See BlockIOThrottle for parameter descriptions.
-#
 # Returns: Nothing on success
 #          If @device is not a valid block device, DeviceNotFound
 #
@@ -2915,8 +2907,6 @@
 # BlockBackend will be created; otherwise, @node-name is mandatory at the top
 # level and no BlockBackend will be created.
 #
-# For the arguments, see the documentation of BlockdevOptions.
-#
 # Note: This command is still a work in progress.  It doesn't support all
 # block drivers among other things.  Stay away from it unless you want
 # to help with its development.
diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py
index df87441..3dd0146 100755
--- a/scripts/qapi2texi.py
+++ b/scripts/qapi2texi.py
@@ -220,9 +220,15 @@ class QAPISchemaGenDocVisitor(qapi.QAPISchemaVisitor):
         doc = self.cur_doc
         if self.out:
             self.out += '\n'
+        if boxed:
+            body = texi_body(doc)
+            body += '\n@b{Arguments:} the members of @code{%s}' % arg_type.name
+            body += texi_sections(doc)
+        else:
+            body = texi_entity(doc, 'Arguments')
         self.out += MSG_FMT(type='Command',
                             name=doc.symbol,
-                            body=texi_entity(doc, 'Arguments'))
+                            body=body)
 
     def visit_event(self, name, info, arg_type, boxed):
         doc = self.cur_doc
-- 
2.7.4

  parent reply	other threads:[~2017-03-15 12:57 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 12:56 [Qemu-devel] [PATCH v2 for-2.9 00/47] qapi: Put type information back into QMP documentation Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 01/47] qapi: Factor QAPISchemaParser._include() out of .__init__() Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 02/47] qapi: Make doc comments optional where we don't need them Markus Armbruster
2017-03-15 14:25   ` Eric Blake
2017-03-15 15:13     ` Markus Armbruster
2017-03-15 15:19       ` Eric Blake
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 04/47] docs/qapi-code-gen.txt: Drop confusing reference to 'gen' Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 05/47] qapi: Have each QAPI schema declare its returns white-list Markus Armbruster
2017-03-15 14:33   ` Eric Blake
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 06/47] qapi: Have each QAPI schema declare its name rule violations Markus Armbruster
2017-03-15 14:53   ` Eric Blake
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 07/47] qapi: Clean up build of generated documentation Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 08/47] tests/qapi-schema: Cover empty union base Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 09/47] qapi: Fix to reject empty union base gracefully Markus Armbruster
2017-03-15 12:56 ` [Qemu-devel] [PATCH v2 for-2.9 10/47] qapi2texi: Fix up output around #optional Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 11/47] qapi: Avoid unwanted blank lines in QAPIDoc Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType' Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 14/47] qapi: Prepare for requiring more complete documentation Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 15/47] qapi: Conjure up QAPIDoc.ArgSection for undocumented members Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 16/47] qapi2texi: Convert to QAPISchemaVisitor Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 17/47] qapi: The #optional tag is redundant, drop Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 18/47] qapi: Use raw strings for regular expressions consistently Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 19/47] qapi: Prefer single-quoted strings more consistently Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 20/47] qapi2texi: Plainer enum value and member name formatting Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 21/47] qapi2texi: Present the table of members more clearly Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 22/47] qapi2texi: Explain enum value undocumentedness " Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 23/47] qapi2texi: Don't hide undocumented members and arguments Markus Armbruster
2017-03-15 12:57 ` Markus Armbruster [this message]
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 25/47] qapi2texi: Include member type in generated documentation Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 26/47] qapi2texi: Generate reference to base type members Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 27/47] qapi2texi: Generate documentation for variant members Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 28/47] qapi2texi: Generate descriptions for simple union tags Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 29/47] qapi2texi: Use category "Object" for all object types Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 30/47] tests/qapi-schema: Improve doc / expression mismatch coverage Markus Armbruster
2017-03-15 14:59   ` Eric Blake
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 31/47] qapi: Fix detection of doc / expression mismatch Markus Armbruster
2017-03-15 15:01   ` Eric Blake
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 32/47] qapi: Move detection of doc / expression name mismatch Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 33/47] qapi: Improve error message on @NAME: in free-form doc Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 34/47] qapi: Move empty doc section checking to doc parser Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 35/47] tests/qapi-schema: Rename doc-bad-args to doc-bad-command-arg Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 36/47] tests/qapi-schema: Improve coverage of bogus member docs Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 37/47] qapi: Fix detection of bogus member documentation Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 38/47] qapi: Eliminate check_docs() and drop QAPIDoc.expr Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 39/47] qapi: Drop unused variable events Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 40/47] qapi: Simplify what gets stored in enum_types Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 41/47] qapi: Factor add_name() calls out of the meta conditional Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 42/47] qapi: enum_types is a list used like a dict, make it one Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 43/47] qapi: struct_types " Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 44/47] qapi: union_types " Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 45/47] qapi: Drop unused .check_clash() parameter schema Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 46/47] qapi: Make pylint a bit happier Markus Armbruster
2017-03-15 12:57 ` [Qemu-devel] [PATCH v2 for-2.9 47/47] qapi: Fix a misleading parser error message Markus Armbruster

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=1489582656-31133-25-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --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).