diff options
author | Markus Armbruster <armbru@redhat.com> | 2025-02-27 09:55:57 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2025-03-06 10:09:27 +0100 |
commit | e09daf1dff8f5117b3e482f1907e762470b5675c (patch) | |
tree | 248603b7d6064504addd351eaafd048a6508c2de /hw | |
parent | 744bce1bf7fecf8b8a8de484328515800f9c9639 (diff) | |
download | qemu-e09daf1dff8f5117b3e482f1907e762470b5675c.zip qemu-e09daf1dff8f5117b3e482f1907e762470b5675c.tar.gz qemu-e09daf1dff8f5117b3e482f1907e762470b5675c.tar.bz2 |
qdev: Change qdev_prop_pci_devfn member @name from "int32" to "str"
Properties using qdev_prop_pci_devfn initially accepted a string of
the form "DEV.FN" or "DEV" where DEV and FN are in hexadecimal.
Member @name was "pci-devfn" initially.
Commit b403298adb5 (qdev: make the non-legacy pci address property
accept an integer) changed them to additionally accept integers: bits
3..7 are DEV, and bits 0..2 are FN. This is inaccessible externally
in device_add so far.
The commit also changed @name to "int32", and set member @legacy-name
to "pci-devfn". Together, this kept QMP command
device-list-properties unaffected: it used @name only when
@legacy_name was null.
Commit 07d09c58dbb (qmp: Print descriptions of object properties)
quietly dumbed that down to use @name always, and the next commit
18b91a3e082q (qdev: Drop legacy_name from qdev properties) dropped
member @legacy_name. This changed the value of @type reported by QMP
command device-list-properties from "pci-devfn" to "int32".
But "int32" is misleading: device_add actually wants QAPI type "str".
So change @name to that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20250227085601.4140852-3-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/qdev-properties-system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index a91551a..f2b6136 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -882,7 +882,7 @@ static int print_pci_devfn(Object *obj, const Property *prop, char *dest, } const PropertyInfo qdev_prop_pci_devfn = { - .name = "int32", + .name = "str", .description = "Slot and optional function number, example: 06.0 or 06", .print = print_pci_devfn, .get = qdev_propinfo_get_int32, |