From c4523aae0664aecaa366d45e3d0f3d810ca33062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 7 Feb 2017 16:53:11 +0400 Subject: tests: add specialized device_find function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow specifying which slot to look for the device. This will be used in the following patch to avoid leaking when multiple devices exists and we want to lookup the hotplug one. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- tests/libqos/virtio-pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/libqos/virtio-pci.h') diff --git a/tests/libqos/virtio-pci.h b/tests/libqos/virtio-pci.h index 0fab916cf8..6ef19094cb 100644 --- a/tests/libqos/virtio-pci.h +++ b/tests/libqos/virtio-pci.h @@ -31,9 +31,9 @@ typedef struct QVirtQueuePCI { extern const QVirtioBus qvirtio_pci; -void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type, - void (*func)(QVirtioDevice *d, void *data), void *data); QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type); +QVirtioPCIDevice *qvirtio_pci_device_find_slot(QPCIBus *bus, + uint16_t device_type, int slot); void qvirtio_pci_device_free(QVirtioPCIDevice *dev); void qvirtio_pci_device_enable(QVirtioPCIDevice *d); -- cgit v1.2.3