From 40ea00b06671f888a6d7afab95335af8ced34d77 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 11 Dec 2020 17:05:04 -0500 Subject: qdev: Make PropertyInfo.print method get Object* argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost Reviewed-by: Marc-André Lureau Message-Id: <20201211220529.2290218-8-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- hw/core/qdev-properties-system.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/core/qdev-properties-system.c') diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index 8912fb4e9c..77b31eb9dc 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -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) { -- cgit v1.2.3