rename qemuDomainDetachSCSIDiskDevice to qemuDomainDetachDiskDevice

The way to detach a USB disk is the same as that to detach a SCSI
disk. Rename this function and we can use it to detach a USB disk.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
This commit is contained in:
Wen Congyang 2011-03-07 11:31:48 +08:00 committed by Eric Blake
parent 56a4d8127f
commit 8f338032b9
3 changed files with 12 additions and 12 deletions

View File

@ -4277,8 +4277,7 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
ret = qemuDomainDetachPciDiskDevice(driver, vm, dev, qemuCaps);
}
else if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_SCSI) {
ret = qemuDomainDetachSCSIDiskDevice(driver, vm, dev,
qemuCaps);
ret = qemuDomainDetachDiskDevice(driver, vm, dev, qemuCaps);
}
else {
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",

View File

@ -1221,10 +1221,10 @@ cleanup:
return ret;
}
int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps)
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps)
{
int i, ret = -1;
virDomainDiskDefPtr detach = NULL;
@ -1241,8 +1241,9 @@ int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
}
if (!qemuCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Underlying qemu does not support SCSI disk removal"));
qemuReportError(VIR_ERR_OPERATION_FAILED,
_("Underlying qemu does not support %s disk removal"),
virDomainDiskBusTypeToString(dev->data.disk->bus));
goto cleanup;
}

View File

@ -77,10 +77,10 @@ int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps);
int qemuDomainDetachSCSIDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps);
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,
virBitmapPtr qemuCaps);
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
virDomainObjPtr vm,
virDomainDeviceDefPtr dev,