mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
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:
parent
56a4d8127f
commit
8f338032b9
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user