]> git.proxmox.com Git - mirror_qemu.git/commit
string-output-visitor: Support lists for non-integer types
authorKevin Wolf <kwolf@redhat.com>
Tue, 21 Nov 2023 17:34:16 +0000 (18:34 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 28 Nov 2023 13:12:49 +0000 (08:12 -0500)
commitea7ec158c1defba4069bfee9a8ecd64365b00363
tree5d864d53fa235d5707af9bd6cb8f0f45a585f551
parent50571883f6dad098e1eecfb717ed509451a7a476
string-output-visitor: Support lists for non-integer types

With the introduction of list-based array properties in qdev, the string
output visitor has to deal with lists of non-integer elements now ('info
qtree' prints all properties with the string output visitor).

Currently there is no explicit support for such lists, and the resulting
output is only the last element because string_output_set() always
replaces the output with the latest value. Instead of replacing the old
value, append comma separated values in list context.

The difference can be observed in 'info qtree' with a 'rocker' device
that has a 'ports' list with more than one element.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20231121173416.346610-3-kwolf@redhat.com>
qapi/string-output-visitor.c