提交 7fec0e59 编写于 作者: P Peter Krempa

qemu: hotplug: Remove code handling possible missing disk source format

qemu media changing code tried to assume old media's format for the new
one if that was not specified. Since the format will always be present
it does not make sense to keep the code around.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 6a840537
......@@ -250,14 +250,9 @@ qemuDomainChangeMediaLegacy(virQEMUDriverPtr driver,
if (qemuGetDriveSourceString(newsrc, NULL, &sourcestr) < 0)
goto cleanup;
if (virStorageSourceGetActualType(newsrc) != VIR_STORAGE_TYPE_DIR) {
if (newsrc->format > 0) {
format = virStorageFileFormatTypeToString(newsrc->format);
} else {
if (disk->src->format > 0)
format = virStorageFileFormatTypeToString(disk->src->format);
}
}
if (virStorageSourceGetActualType(newsrc) != VIR_STORAGE_TYPE_DIR)
format = virStorageFileFormatTypeToString(newsrc->format);
qemuDomainObjEnterMonitor(driver, vm);
rc = qemuMonitorChangeMedia(priv->mon,
driveAlias,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册