VIR_DEBUG("Removing PCI device %s from inactive list",
virPCIDeviceGetName(pci));
- actual = virPCIDeviceListSteal(mgr->inactivePCIHostdevs, pci);
+ actual = virPCIDeviceListSteal(mgr->inactivePCIHostdevs, virPCIDeviceGetAddress(pci));
VIR_DEBUG("Adding PCI device %s to active list",
virPCIDeviceGetName(pci));
VIR_DEBUG("Removing PCI device %s from active list",
virPCIDeviceGetName(pci));
- if (!(actual = virPCIDeviceListSteal(mgr->activePCIHostdevs, pci)))
+ if (!(actual = virPCIDeviceListSteal(mgr->activePCIHostdevs,
+ virPCIDeviceGetAddress(pci))))
continue;
VIR_DEBUG("Adding PCI device %s to inactive list",
VIR_DEBUG("Removing PCI device %s from active list",
virPCIDeviceGetName(pci));
- actual = virPCIDeviceListSteal(mgr->activePCIHostdevs, pci);
+ actual = virPCIDeviceListSteal(mgr->activePCIHostdevs,
+ virPCIDeviceGetAddress(pci));
VIR_DEBUG("Adding PCI device %s to inactive list",
virPCIDeviceGetName(pci));
virPCIDevicePtr
virPCIDeviceListSteal(virPCIDeviceListPtr list,
- virPCIDevicePtr dev)
+ virPCIDeviceAddressPtr devAddr)
{
- return virPCIDeviceListStealIndex(list, virPCIDeviceListFindIndex(list, &dev->address));
+ return virPCIDeviceListStealIndex(list, virPCIDeviceListFindIndex(list, devAddr));
}
void
virPCIDeviceListDel(virPCIDeviceListPtr list,
virPCIDevicePtr dev)
{
- virPCIDeviceFree(virPCIDeviceListSteal(list, dev));
+ virPCIDeviceFree(virPCIDeviceListSteal(list, &dev->address));
}
int
int idx);
size_t virPCIDeviceListCount(virPCIDeviceListPtr list);
virPCIDevicePtr virPCIDeviceListSteal(virPCIDeviceListPtr list,
- virPCIDevicePtr dev);
+ virPCIDeviceAddressPtr devAddr);
virPCIDevicePtr virPCIDeviceListStealIndex(virPCIDeviceListPtr list,
int idx);
void virPCIDeviceListDel(virPCIDeviceListPtr list,