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

extract general code from qemuDomainReAttachHostUsbDevices

Extract general code from qemuDomainReAttachHostUsbDevices to
virHostdevDomainReAttachHostUsbDevices.
上级 5035f75f
......@@ -316,15 +316,13 @@ qemuDomainReAttachHostdevDevices(virQEMUDriverPtr driver,
virObjectUnref(cfg);
}
void
qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
static void
virHostdevReAttachUsbHostdevs(virHostdevManagerPtr hostdev_mgr,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
{
size_t i;
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
virObjectLock(hostdev_mgr->activeUsbHostdevs);
for (i = 0; i < nhostdevs; i++) {
......@@ -383,6 +381,17 @@ qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
virObjectUnlock(hostdev_mgr->activeUsbHostdevs);
}
void
qemuDomainReAttachHostUsbDevices(virQEMUDriverPtr driver,
const char *name,
virDomainHostdevDefPtr *hostdevs,
int nhostdevs)
{
virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr;
virHostdevReAttachUsbHostdevs(hostdev_mgr, name, hostdevs, nhostdevs);
}
void
qemuDomainReAttachHostScsiDevices(virQEMUDriverPtr driver,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册