]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuMigrationSrcToLegacyFile: Remove 'driver' argument
authorPeter Krempa <pkrempa@redhat.com>
Tue, 2 Dec 2025 16:45:36 +0000 (17:45 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 7 Jan 2026 12:48:19 +0000 (13:48 +0100)
We pass in 'vm' which contains it in the private data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_migration.c

index 87b2135b5776c16129db3b6da9e1789ec0c52ec5..dfe522739038bf4792857d532c86fa9ede9fe7f4 100644 (file)
@@ -7145,8 +7145,7 @@ qemuMigrationProcessUnattended(virQEMUDriver *driver,
 
 
 static int
-qemuMigrationSrcToLegacyFile(virQEMUDriver *driver,
-                             virDomainObj *vm,
+qemuMigrationSrcToLegacyFile(virDomainObj *vm,
                              int fd,
                              virCommand *compressor,
                              virDomainAsyncJob asyncJob)
@@ -7163,7 +7162,7 @@ qemuMigrationSrcToLegacyFile(virQEMUDriver *driver,
      * doesn't have to open() the file, so while we still have to
      * grant SELinux access, we can do it on fd and avoid cleanup
      * later, as well as skip futzing with cgroup.  */
-    if (qemuSecuritySetImageFDLabel(driver->securityManager, vm->def,
+    if (qemuSecuritySetImageFDLabel(priv->driver->securityManager, vm->def,
                                     compressor ? pipeFD[1] : fd) < 0)
         goto cleanup;
 
@@ -7297,7 +7296,7 @@ qemuMigrationSrcToFile(virQEMUDriver *driver, virDomainObj *vm,
         qemuMigrationParamsCapEnabled(migParams, QEMU_MIGRATION_CAP_MAPPED_RAM))
         rc = qemuMigrationSrcToSparseFile(driver, vm, path, fd, bypassCache, asyncJob);
     else
-        rc = qemuMigrationSrcToLegacyFile(driver, vm, *fd, compressor, asyncJob);
+        rc = qemuMigrationSrcToLegacyFile(vm, *fd, compressor, asyncJob);
 
     if (rc < 0)
         goto cleanup;