提交 c82c2745 编写于 作者: C Chunyan Liu 提交者: Daniel P. Berrange

pass driver name as parameter to virHostdevPrepareSCSIDevices

上级 313437ac
...@@ -247,6 +247,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver, ...@@ -247,6 +247,7 @@ qemuPrepareHostUSBDevices(virQEMUDriverPtr driver,
static int static int
virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr, virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
const char *drv_name,
const char *name, const char *name,
virDomainHostdevDefPtr *hostdevs, virDomainHostdevDefPtr *hostdevs,
int nhostdevs) int nhostdevs)
...@@ -317,10 +318,10 @@ virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr, ...@@ -317,10 +318,10 @@ virHostdevPrepareSCSIDevices(virHostdevManagerPtr hostdev_mgr,
goto error; goto error;
} }
if (virSCSIDeviceSetUsedBy(tmp, QEMU_DRIVER_NAME, name) < 0) if (virSCSIDeviceSetUsedBy(tmp, drv_name, name) < 0)
goto error; goto error;
} else { } else {
if (virSCSIDeviceSetUsedBy(scsi, QEMU_DRIVER_NAME, name) < 0) if (virSCSIDeviceSetUsedBy(scsi, drv_name, name) < 0)
goto error; goto error;
VIR_DEBUG("Adding %s to activeScsiHostdevs", virSCSIDeviceGetName(scsi)); VIR_DEBUG("Adding %s to activeScsiHostdevs", virSCSIDeviceGetName(scsi));
...@@ -380,8 +381,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver, ...@@ -380,8 +381,8 @@ qemuPrepareHostdevSCSIDevices(virQEMUDriverPtr driver,
return -1; return -1;
} }
return virHostdevPrepareSCSIDevices(hostdev_mgr, name, return virHostdevPrepareSCSIDevices(hostdev_mgr, QEMU_DRIVER_NAME,
hostdevs, nhostdevs); name, hostdevs, nhostdevs);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册