}
int
-virPCIDeviceUnbind(virPCIDevicePtr dev, bool reprobe)
+virPCIDeviceUnbind(virPCIDevicePtr dev)
{
char *path = NULL;
char *drvpath = NULL;
dev->name, driver);
goto cleanup;
}
- dev->reprobe = reprobe;
}
ret = 0;
if (!isStub)
goto remove_slot;
- if (virPCIDeviceUnbind(dev, dev->reprobe) < 0)
+ if (virPCIDeviceUnbind(dev) < 0)
goto cleanup;
dev->unbind_from_stub = false;
goto remove_id;
}
- if (virPCIDeviceUnbind(dev, reprobe) < 0)
+ if (virPCIDeviceUnbind(dev) < 0)
goto remove_id;
+ /* If the device was bound to a driver we'll need to reprobe later */
+ dev->reprobe = reprobe;
+
/* If the device isn't already bound to pci-stub, try binding it now.
*/
if (!virFileLinkPointsTo(driverLink, stubDriverPath)) {
int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path,
char **pfname, int *vf_index);
-int virPCIDeviceUnbind(virPCIDevicePtr dev, bool reprobe);
+int virPCIDeviceUnbind(virPCIDevicePtr dev);
int virPCIDeviceGetDriverPathAndName(virPCIDevicePtr dev,
char **path,
char **name);