summary refs log tree commit diff stats
path: root/include/qapi/string-output-visitor.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-12-12 08:49:34 -0500
committerKevin Wolf <kwolf@redhat.com>2023-12-21 22:49:28 +0100
commitff32bb53476539d352653f4ed56372dced73a388 (patch)
tree0805bcfad6e519065fafcabfea932a7d98f2aa2f /include/qapi/string-output-visitor.h
parentc12887e1b087e8f69d217ccae3dc7b1d059f3db3 (diff)
downloadfocaccia-qemu-ff32bb53476539d352653f4ed56372dced73a388.tar.gz
focaccia-qemu-ff32bb53476539d352653f4ed56372dced73a388.zip
string-output-visitor: show structs as "<omitted>"
StringOutputVisitor crashes when it visits a struct because
->start_struct() is NULL.

Show "<omitted>" instead of crashing. This is necessary because the
virtio-blk-pci iothread-vq-mapping parameter that I'd like to introduce
soon is a list of IOThreadMapping structs.

This patch is a quick fix to solve the crash, but the long-term solution
is replacing StringOutputVisitor with something that can handle the full
gamut of values in QEMU.

Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20231212134934.500289-1-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/qapi/string-output-visitor.h')
-rw-r--r--include/qapi/string-output-visitor.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/qapi/string-output-visitor.h b/include/qapi/string-output-visitor.h
index 268dfe9986..b1ee473b30 100644
--- a/include/qapi/string-output-visitor.h
+++ b/include/qapi/string-output-visitor.h
@@ -26,9 +26,9 @@ typedef struct StringOutputVisitor StringOutputVisitor;
  * If everything else succeeds, pass @result to visit_complete() to
  * collect the result of the visit.
  *
- * The string output visitor does not implement support for visiting
- * QAPI structs, alternates, null, or arbitrary QTypes.  It also
- * requires a non-null list argument to visit_start_list().
+ * The string output visitor does not implement support for alternates, null,
+ * or arbitrary QTypes.  Struct fields are not shown.  It also requires a
+ * non-null list argument to visit_start_list().
  */
 Visitor *string_output_visitor_new(bool human, char **result);