if (STRNEQ_NULLABLE(drv_name, actual_drvname) ||
STRNEQ_NULLABLE(dom_name, actual_domname)) {
- virPCIDeviceListDel(pcidevs, pci);
+ virPCIDeviceListDel(pcidevs, virPCIDeviceGetAddress(pci));
continue;
}
} else {
- virPCIDeviceListDel(pcidevs, pci);
+ virPCIDeviceListDel(pcidevs, virPCIDeviceGetAddress(pci));
continue;
}
while (lastGoodPCIIdx >= 0) {
virPCIDevicePtr actual = virPCIDeviceListGet(pciDevices, i);
- virPCIDeviceListDel(hostdev_mgr->activePCIHostdevs, actual);
+ virPCIDeviceListDel(hostdev_mgr->activePCIHostdevs,
+ virPCIDeviceGetAddress(actual));
lastGoodPCIIdx--;
}
/* Steal the dev from list inactiveDevs */
if (inactiveDevs) {
VIR_DEBUG("Removing PCI device %s from inactive list", dev->name);
- virPCIDeviceListDel(inactiveDevs, dev);
+ virPCIDeviceListDel(inactiveDevs, &dev->address);
}
return 0;
void
virPCIDeviceListDel(virPCIDeviceListPtr list,
- virPCIDevicePtr dev)
+ virPCIDeviceAddressPtr devAddr)
{
- virPCIDeviceFree(virPCIDeviceListSteal(list, &dev->address));
+ virPCIDeviceFree(virPCIDeviceListSteal(list, devAddr));
}
int
virPCIDevicePtr virPCIDeviceListStealIndex(virPCIDeviceListPtr list,
int idx);
void virPCIDeviceListDel(virPCIDeviceListPtr list,
- virPCIDevicePtr dev);
+ virPCIDeviceAddressPtr devAddr);
virPCIDevicePtr virPCIDeviceListFind(virPCIDeviceListPtr list,
virPCIDeviceAddressPtr devAddr);
virPCIDevicePtr