
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@redhat.com> --- 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@redhat.com>