mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
qdev: Make PropertyInfo.print method get Object* argument
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201211220529.2290218-8-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
5eb32b2113
commit
40ea00b066
3 changed files with 4 additions and 4 deletions
|
@ -801,9 +801,10 @@ invalid:
|
|||
g_free(str);
|
||||
}
|
||||
|
||||
static int print_pci_devfn(DeviceState *dev, Property *prop, char *dest,
|
||||
static int print_pci_devfn(Object *obj, Property *prop, char *dest,
|
||||
size_t len)
|
||||
{
|
||||
DeviceState *dev = DEVICE(obj);
|
||||
int32_t *ptr = qdev_get_prop_ptr(dev, prop);
|
||||
|
||||
if (*ptr == -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue