提交 4df7280b 编写于 作者: Y Yi Li 提交者: Michal Privoznik

qemuDomainSnapshotPrepare: use local dom_disk variable

Replace vm->def->disks[i] with dom_disk variable which is
initialized to the same disk.
Signed-off-by: NYi Li <yili@winhong.com>
Reviewed-by: NPavel Mores <pmores@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 da05322f
......@@ -14837,14 +14837,13 @@ qemuDomainSnapshotPrepare(virDomainObjPtr vm,
active) < 0)
return -1;
if (vm->def->disks[i]->src->format > 0 &&
vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) {
if (dom_disk->src->format > 0 &&
dom_disk->src->format != VIR_STORAGE_FILE_QCOW2) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("internal snapshot for disk %s unsupported "
"for storage type %s"),
disk->name,
virStorageFileFormatTypeToString(
vm->def->disks[i]->src->format));
virStorageFileFormatTypeToString(dom_disk->src->format));
return -1;
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册