1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-10 05:17:59 +03:00

pci: Phase out virPCIDeviceReattachInit()

The name is confusing, and there are just two uses: one is a test case,
and the other will be removed as part of an upcoming refactoring of
the hostdev code.
This commit is contained in:
Andrea Bolognani 2016-01-19 15:58:31 +01:00
parent d773b57d22
commit 771eaeb2b3
5 changed files with 7 additions and 12 deletions

View File

@ -1993,7 +1993,6 @@ virPCIDeviceListSteal;
virPCIDeviceListStealIndex;
virPCIDeviceNew;
virPCIDeviceReattach;
virPCIDeviceReattachInit;
virPCIDeviceReset;
virPCIDeviceSetManaged;
virPCIDeviceSetRemoveSlot;

View File

@ -1619,7 +1619,9 @@ virHostdevPCINodeDeviceReAttach(virHostdevManagerPtr hostdev_mgr,
if (virHostdevIsPCINodeDeviceUsed(virPCIDeviceGetAddress(pci), &data))
goto out;
virPCIDeviceReattachInit(pci);
virPCIDeviceSetUnbindFromStub(pci, true);
virPCIDeviceSetRemoveSlot(pci, true);
virPCIDeviceSetReprobe(pci, true);
if (virPCIDeviceReattach(pci, hostdev_mgr->activePCIHostdevs,
hostdev_mgr->inactivePCIHostdevs) < 0)

View File

@ -1771,14 +1771,6 @@ virPCIDeviceGetUsedBy(virPCIDevicePtr dev,
*dom_name = dev->used_by_domname;
}
void virPCIDeviceReattachInit(virPCIDevicePtr pci)
{
pci->unbind_from_stub = true;
pci->remove_slot = true;
pci->reprobe = true;
}
virPCIDeviceListPtr
virPCIDeviceListNew(void)
{

View File

@ -119,7 +119,6 @@ void virPCIDeviceSetRemoveSlot(virPCIDevice *dev,
unsigned int virPCIDeviceGetReprobe(virPCIDevicePtr dev);
void virPCIDeviceSetReprobe(virPCIDevice *dev,
bool reprobe);
void virPCIDeviceReattachInit(virPCIDevice *dev);
virPCIDeviceListPtr virPCIDeviceListNew(void);

View File

@ -301,7 +301,10 @@ testVirPCIDeviceReattachSingle(const void *opaque)
if (!dev)
goto cleanup;
virPCIDeviceReattachInit(dev);
virPCIDeviceSetUnbindFromStub(dev, true);
virPCIDeviceSetRemoveSlot(dev, true);
virPCIDeviceSetReprobe(dev, true);
if (virPCIDeviceReattach(dev, NULL, NULL) < 0)
goto cleanup;