* information about active / inactive device across
* daemon restarts has been implemented */
- if (virPCIDeviceGetDriverPathAndName(pci,
- &driverPath, &driverName) < 0)
+ if (virPCIDeviceGetCurrentDriverPathAndName(pci, &driverPath,
+ &driverName) < 0) {
goto reattachdevs;
+ }
stub = virPCIStubDriverTypeFromString(driverName);
g_autofree char *drvName = NULL;
int stub = VIR_PCI_STUB_DRIVER_NONE;
- if (virPCIDeviceGetDriverPathAndName(pci, &drvPath, &drvName) < 0)
+ if (virPCIDeviceGetCurrentDriverPathAndName(pci, &drvPath, &drvName) < 0)
goto cleanup;
if (drvName)
virPCIDeviceFree;
virPCIDeviceGetAddress;
virPCIDeviceGetConfigPath;
-virPCIDeviceGetDriverPathAndName;
+virPCIDeviceGetCurrentDriverPathAndName;
virPCIDeviceGetIOMMUGroupDev;
virPCIDeviceGetIOMMUGroupList;
virPCIDeviceGetLinkCapSta;
}
-/* virPCIDeviceGetDriverPathAndName - put the path to the driver
+/* virPCIDeviceGetCurrentDriverPathAndName - put the path to the driver
* directory of the driver in use for this device in @path and the
* name of the driver in @name. Both could be NULL if it's not bound
* to any driver.
* Return 0 for success, -1 for error.
*/
int
-virPCIDeviceGetDriverPathAndName(virPCIDevice *dev, char **path, char **name)
+virPCIDeviceGetCurrentDriverPathAndName(virPCIDevice *dev,
+ char **path,
+ char **name)
{
int ret = -1;
g_autofree char *drvlink = NULL;
* reset it whenever appropriate, so doing it ourselves would just
* be redundant.
*/
- if (virPCIDeviceGetDriverPathAndName(dev, &drvPath, &drvName) < 0)
+ if (virPCIDeviceGetCurrentDriverPathAndName(dev, &drvPath, &drvName) < 0)
goto cleanup;
if (virPCIStubDriverTypeFromString(drvName) == VIR_PCI_STUB_DRIVER_VFIO) {
g_autofree char *drvpath = NULL;
g_autofree char *driver = NULL;
- if (virPCIDeviceGetDriverPathAndName(dev, &drvpath, &driver) < 0)
+ if (virPCIDeviceGetCurrentDriverPathAndName(dev, &drvpath, &driver) < 0)
return -1;
if (!driver)
int virPCIDeviceUnbind(virPCIDevice *dev);
int virPCIDeviceRebind(virPCIDevice *dev);
-int virPCIDeviceGetDriverPathAndName(virPCIDevice *dev,
- char **path,
- char **name);
+int virPCIDeviceGetCurrentDriverPathAndName(virPCIDevice *dev,
+ char **path,
+ char **name);
int virPCIDeviceIsPCIExpress(virPCIDevice *dev);
int virPCIDeviceHasPCIExpressLink(virPCIDevice *dev);
g_autofree char *path = NULL;
g_autofree char *driver = NULL;
- if (virPCIDeviceGetDriverPathAndName(dev, &path, &driver) < 0)
+ if (virPCIDeviceGetCurrentDriverPathAndName(dev, &path, &driver) < 0)
return -1;
if (STRNEQ_NULLABLE(driver, expected)) {