Re: [PATCH] storage: use local dom_disk parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 07, 2020 at 08:10:29PM +0800, Yi Li wrote:
> 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
> 

Reviewed-by: Pavel Mores <pmores@xxxxxxxxxx>





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux