]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
src: Unify argument name of virDomainMigrateBegin3()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 4 Jun 2025 14:28:41 +0000 (16:28 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 2 Jul 2025 08:00:13 +0000 (10:00 +0200)
The virDomainMigrateBegin3() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusion. Unify the name.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/driver-hypervisor.h
src/libvirt_internal.h
src/qemu/qemu_driver.c
src/remote/remote_daemon_dispatch.c
src/remote/remote_driver.c
src/remote/remote_protocol.x
src/remote_protocol-structs
src/rpc/gendispatch.pl

index c0099198bbb55f36a4febcee2e17c80f938007a0..3f367806eedcb7a0086a6cf2a480f9cabde6b654 100644 (file)
@@ -981,7 +981,7 @@ typedef char *
                              int *cookieoutlen,
                              unsigned long flags,
                              const char *dname,
-                             unsigned long resource);
+                             unsigned long bandwidth);
 
 typedef int
 (*virDrvDomainMigratePrepare3)(virConnectPtr dconn,
index 293a11be4ea34b4fa3dd79739769f76beae1bcaa..df99fe260c8257314bd02f4e8664b1c26955ca18 100644 (file)
@@ -190,7 +190,7 @@ char *virDomainMigrateBegin3(virDomainPtr domain,
                              int *cookieoutlen,
                              unsigned long flags,
                              const char *dname,
-                             unsigned long resource);
+                             unsigned long bandwidth);
 
 int virDomainMigratePrepare3(virConnectPtr dconn,
                              const char *cookiein,
index b2f7e76fd6fa3f49df081984b555a485626b9d9f..c87e981cc0f05abb5aa8bddb9c396bb9c17a4c0a 100644 (file)
@@ -10965,7 +10965,7 @@ qemuDomainMigrateBegin3(virDomainPtr domain,
                         int *cookieoutlen,
                         unsigned long flags,
                         const char *dname,
-                        unsigned long resource G_GNUC_UNUSED)
+                        unsigned long bandwidth G_GNUC_UNUSED)
 {
     virDomainObj *vm;
 
index 12ad1ce548ffaaa08b018ff6d8f2619438fbdfd3..2abfe7bf3b456a05045ffe0645f7ac99085b3466 100644 (file)
@@ -4805,7 +4805,7 @@ remoteDispatchDomainMigrateBegin3(virNetServer *server G_GNUC_UNUSED,
 
     if (!(xml = virDomainMigrateBegin3(dom, xmlin,
                                        &cookieout, &cookieoutlen,
-                                       args->flags, dname, args->resource)))
+                                       args->flags, dname, args->bandwidth)))
         goto cleanup;
 
     /* remoteDispatchClientRequest will free cookie and
index 815be8548d12d700840729fc19764c49b2d94fff..8fd387fc1c91924a38275b49e1127ada95633961 100644 (file)
@@ -5648,7 +5648,7 @@ remoteDomainMigrateBegin3(virDomainPtr domain,
                           int *cookieoutlen,
                           unsigned long flags,
                           const char *dname,
-                          unsigned long resource)
+                          unsigned long bandwidth)
 {
     remote_domain_migrate_begin3_args args = {0};
     g_auto(remote_domain_migrate_begin3_ret) ret = {0};
@@ -5659,7 +5659,7 @@ remoteDomainMigrateBegin3(virDomainPtr domain,
     args.xmlin = xmlin == NULL ? NULL : (char **) &xmlin;
     args.flags = flags;
     args.dname = dname == NULL ? NULL : (char **) &dname;
-    args.resource = resource;
+    args.bandwidth = bandwidth;
 
     if (call(domain->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_BEGIN3,
              (xdrproc_t) xdr_remote_domain_migrate_begin3_args, (char *) &args,
index f6d0ad30b68bad7f3c3802869f778b9e696d4616..21aaf615baaf832348888f840f6627e90281891d 100644 (file)
@@ -2947,7 +2947,7 @@ struct remote_domain_migrate_begin3_args {
     remote_string xmlin;
     unsigned hyper flags;
     remote_string dname;
-    unsigned hyper resource;
+    unsigned hyper bandwidth;
 };
 
 struct remote_domain_migrate_begin3_ret {
index 370a5e234491ea5153cb972b2a641b5e36aa8edd..63a51e33621d49ad41ec27f30798fd97519ee9bc 100644 (file)
@@ -2262,7 +2262,7 @@ struct remote_domain_migrate_begin3_args {
         remote_string              xmlin;
         uint64_t                   flags;
         remote_string              dname;
-        uint64_t                   resource;
+        uint64_t                   bandwidth;
 };
 struct remote_domain_migrate_begin3_ret {
         struct {
index abc260ea5683041a90626d26d6681d010c431ebf..1a7d09056e04fd74148f99740d89c8e3d88cd1f8 100755 (executable)
@@ -396,7 +396,7 @@ my $long_legacy = {
     DomainGetInfo               => { ret => { maxMem => 1, memory => 1 } },
     DomainMigrate               => { arg => { flags => 1, resource => 1 } },
     DomainMigrate2              => { arg => { flags => 1, resource => 1 } },
-    DomainMigrateBegin3         => { arg => { flags => 1, resource => 1 } },
+    DomainMigrateBegin3         => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigrateConfirm3       => { arg => { flags => 1, resource => 1 } },
     DomainMigrateDirect         => { arg => { flags => 1, resource => 1 } },
     DomainMigrateFinish         => { arg => { flags => 1 } },