qdev: Avoid using string visitor for properties
commitc34efecedd0552ee8b830402241e19daebb22aec
authorKevin Wolf <kwolf@redhat.com>
Fri, 8 Oct 2021 13:34:34 +0000 (8 15:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Oct 2021 14:06:23 +0000 (15 16:06 +0200)
tree2a9dc511e3a75f06e4cbf786c8ad26fa3193e1f2
parentaf6400afb89f5eb3f66f841c8ee8c2f6754c8394
qdev: Avoid using string visitor for properties

The only thing the string visitor adds compared to a keyval visitor is
list support. git grep for 'visit_start_list' and 'visit.*List' shows
that devices don't make use of this.

In a world with a QAPIfied command line interface, the keyval visitor is
used to parse the command line. In order to make sure that no devices
start using this feature that would make backwards compatibility harder,
just switch away from object_property_parse(), which internally uses the
string visitor, to a keyval visitor and object_property_set().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20211008133442.141332-8-kwolf@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
softmmu/qdev-monitor.c