qemu-cr16/docs
John Snow 636c96cd77 qapi: Fix undocumented return values by generating something
Generated command documentation lacks information on return value in
several cases, e.g. query-tpm.

The obvious fix would be to require a Returns: section when a command
returns something.

However, note that many existing Returns: sections are pretty useless:
the description is basically the return type, which then gets rendered
like "Return: <Type> – <basically the return type>".  This suggests
that a description is often not really necessary, and requiring one
isn't useful.

Instead, generate the obvious minimal thing when Returns: is absent:
"Return: <Type>".

This auto-generated Return documentation is placed is as follows:

1. If we have arguments, return goes right after them.
2. Else if we have errors, return goes right before them.
3. Else if we have features, return goes right before them.
4. Else return goes right after the intro

To facilitate this algorithm, a "TODO:" hack line is used to separate
the intro from the remainder of the documentation block in cases where
there are no other sections to separate the intro from e.g. examples and
additional detail meant to appear below the key sections of interest.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250711051045.51110-3-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[_insert_near_kind() code replaced by something simpler, commit
message amended to explain why we're doing this]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2025-07-14 12:03:03 +02:00
..
_templates
about target-arm queue: 2025-07-07 09:22:41 -04:00
config vl: recognize audiodev groups in configuration files 2023-09-22 17:35:11 +02:00
devel docs/qapi-domain: add return-nodesc 2025-07-14 12:02:58 +02:00
interop docs/sphinx: remove special parsing for freeform sections 2025-07-14 10:08:27 +02:00
specs docs/specs/riscv-iommu: Fixed broken link to external risv iommu document 2025-03-28 16:49:57 +10:00
sphinx qapi: Fix undocumented return values by generating something 2025-07-14 12:03:03 +02:00
sphinx-static docs/qapi-domain: add CSS styling 2025-03-11 10:10:57 +01:00
spin treewide: fix paths for relocated files in comments 2025-07-02 18:26:27 +02:00
system docs/system: arm: Add max78000 board description 2025-07-11 13:27:41 +01:00
tools qemu-nbd: Allow users to adjust handshake limit 2025-02-11 13:45:46 -06:00
user docs/user: Document the %d placeholder and suspend=n QEMU_GDB features 2025-02-10 13:47:59 +00:00
block-replication.txt
bypass-iommu.txt
COLO-FT.txt chardev: finalize 'reconnect' deprecation 2024-10-28 14:37:25 +08:00
colo-proxy.txt colo: examples: remove mentions of script= and (wrong) downscript= 2024-01-30 21:20:20 +03:00
conf.py include/hw/boards: add warning about changing deprecation logic 2025-05-08 17:11:16 +01:00
defs.rst.inc
glossary.rst docs: disambiguate cross-references 2025-03-11 10:26:52 +01:00
igd-assign.txt vfio/igd: Remove generation limitation for IGD passthrough 2025-05-09 12:42:27 +02:00
image-fuzzer.txt
index.rst docs: add a glossary 2025-01-17 10:45:54 +00:00
memory-hotplug.txt
meson.build 9p: remove 'proxy' filesystem backend driver 2024-10-03 19:33:25 +02:00
multi-thread-compression.txt docs tests: Fix use of migrate_set_parameter 2023-09-08 13:08:52 +03:00
multiseat.txt
nvdimm.txt
pci_expander_bridge.txt docs, tests: do not specify scsi=off 2024-06-05 11:00:56 +02:00
pcie.txt docs/pcie.txt: Replace ioh3420 with pcie-root-port 2023-01-28 06:21:30 -05:00
pcie_pci_bridge.txt
pcie_sriov.txt pcie_sriov: Ensure VF addr does not overflow 2025-02-20 18:23:19 -05:00
qcow2-cache.txt docs/interop: convert text files to restructuredText 2025-05-29 17:45:10 +01:00
qdev-device-use.txt util: remove support -chardev tty and -chardev parport 2023-01-06 00:51:02 +01:00
qemu-option-trace.rst.inc
qemupciserial.inf
rdma.txt docs tests: Fix use of migrate_set_parameter 2023-09-08 13:08:52 +03:00
requirements.txt pythondeps.toml: warn about updates needed to docs/requirements.txt 2024-04-23 17:35:26 +02:00
spice-port-fqdn.txt
throttle.txt
xbzrle.txt
xen-save-devices-state.txt