Re: [libvirt PATCH 44/80] qemu: Introduce qemuMigrationSrcBeginXML helper

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

 



On Tue, May 10, 2022 at 17:21:05 +0200, Jiri Denemark wrote:
> Turn the final part of Begin phase formatting a domain XML for migration
> into a reusable helper.
> 
> Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
> ---
>  src/qemu/qemu_migration.c | 95 ++++++++++++++++++++++++---------------
>  1 file changed, 58 insertions(+), 37 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 180a760bca..7299bb6a0b 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -2487,6 +2487,60 @@ qemuMigrationAnyRefreshStatus(virQEMUDriver *driver,
>  }
>  
>  
> +static char *
> +qemuMigrationSrcBeginXML(virQEMUDriver *driver,

The name of this function is a bit too generic IMO, and doesn't imply
that it's actually formatting the XML.

Also note that 'driver' can be fetched from 'priv->driver' since you are
refactoring the code.

> +                         virDomainObj *vm,
> +                         const char *xmlin,
> +                         char **cookieout,
> +                         int *cookieoutlen,
> +                         unsigned int cookieFlags,
> +                         const char **migrate_disks,
> +                         size_t nmigrate_disks,
> +                         unsigned long flags)

Preferrably remove the 'driver' argument. I can live with the name.

Reviewed-by: Peter Krempa <pkrempa@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