mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
tests: add specialized device_find function
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 <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
62030ed135
commit
c4523aae06
2 changed files with 27 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue