提交 771eaeb2 编写于 作者: A Andrea Bolognani

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.
上级 d773b57d
......@@ -1993,7 +1993,6 @@ virPCIDeviceListSteal;
virPCIDeviceListStealIndex;
virPCIDeviceNew;
virPCIDeviceReattach;
virPCIDeviceReattachInit;
virPCIDeviceReset;
virPCIDeviceSetManaged;
virPCIDeviceSetRemoveSlot;
......
......@@ -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)
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册