replace vm->def->disks[i] with dom_disk parameter Signed-off-by: Yi Li <yili@xxxxxxxxxxx> --- src/qemu/qemu_driver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index daa3cb397d..27f43124ac 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14841,14 +14841,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; -- 2.13.6