mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00: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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user