From: Michal Privoznik <mpriv...@redhat.com>

The virDomainMigratePerform3() API declares its last argument as
'bandwidth', though throughout various typedefs, RPC and callback
implementations the name is changed to 'resource'. This creates a
confusing. Unify the name.

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 src/driver-hypervisor.h             | 2 +-
 src/libvirt_internal.h              | 2 +-
 src/qemu/qemu_driver.c              | 4 ++--
 src/remote/remote_daemon_dispatch.c | 2 +-
 src/remote/remote_driver.c          | 4 ++--
 src/remote/remote_protocol.x        | 2 +-
 src/remote_protocol-structs         | 2 +-
 src/rpc/gendispatch.pl              | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h
index 3f367806ee..6a43688b0c 100644
--- a/src/driver-hypervisor.h
+++ b/src/driver-hypervisor.h
@@ -1020,7 +1020,7 @@ typedef int
                                const char *uri,
                                unsigned long flags,
                                const char *dname,
-                               unsigned long resource);
+                               unsigned long bandwidth);
 
 typedef virDomainPtr
 (*virDrvDomainMigrateFinish3)(virConnectPtr dconn,
diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h
index df99fe260c..b3376e4a24 100644
--- a/src/libvirt_internal.h
+++ b/src/libvirt_internal.h
@@ -226,7 +226,7 @@ int virDomainMigratePerform3(virDomainPtr dom,
                              const char *uri, /* VM Migration URI */
                              unsigned long flags,
                              const char *dname,
-                             unsigned long resource);
+                             unsigned long bandwidth);
 
 virDomainPtr virDomainMigrateFinish3(virConnectPtr dconn,
                                      const char *dname,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a89b78d5d8..99db92008f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11284,7 +11284,7 @@ qemuDomainMigratePerform3(virDomainPtr dom,
                           const char *uri,
                           unsigned long flags,
                           const char *dname,
-                          unsigned long resource)
+                          unsigned long bandwidth)
 {
     virQEMUDriver *driver = dom->conn->privateData;
     virDomainObj *vm = NULL;
@@ -11308,7 +11308,7 @@ qemuDomainMigratePerform3(virDomainPtr dom,
                                   NULL, migParams,
                                   cookiein, cookieinlen,
                                   cookieout, cookieoutlen,
-                                  flags, dname, resource, true);
+                                  flags, dname, bandwidth, true);
 
  cleanup:
     virDomainObjEndAPI(&vm);
diff --git a/src/remote/remote_daemon_dispatch.c 
b/src/remote/remote_daemon_dispatch.c
index 2abfe7bf3b..7e74ff063f 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -4910,7 +4910,7 @@ remoteDispatchDomainMigratePerform3(virNetServer *server 
G_GNUC_UNUSED,
                                  args->cookie_in.cookie_in_len,
                                  &cookieout, &cookieoutlen,
                                  dconnuri, uri,
-                                 args->flags, dname, args->resource) < 0)
+                                 args->flags, dname, args->bandwidth) < 0)
         goto cleanup;
 
     /* remoteDispatchClientRequest will free cookie
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 8fd387fc1c..ec71eaed87 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5806,7 +5806,7 @@ remoteDomainMigratePerform3(virDomainPtr dom,
                             const char *uri,
                             unsigned long flags,
                             const char *dname,
-                            unsigned long resource)
+                            unsigned long bandwidth)
 {
     remote_domain_migrate_perform3_args args = {0};
     g_auto(remote_domain_migrate_perform3_ret) ret = {0};
@@ -5822,7 +5822,7 @@ remoteDomainMigratePerform3(virDomainPtr dom,
     args.dname = dname == NULL ? NULL : (char **) &dname;
     args.uri = uri == NULL ? NULL : (char **) &uri;
     args.dconnuri = dconnuri == NULL ? NULL : (char **) &dconnuri;
-    args.resource = resource;
+    args.bandwidth = bandwidth;
 
     if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PERFORM3,
              (xdrproc_t) xdr_remote_domain_migrate_perform3_args, (char *) 
&args,
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 21aaf615ba..3c93203210 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2989,7 +2989,7 @@ struct remote_domain_migrate_perform3_args {
     remote_string uri;
     unsigned hyper flags;
     remote_string dname;
-    unsigned hyper resource;
+    unsigned hyper bandwidth;
 };
 
 struct remote_domain_migrate_perform3_ret {
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 63a51e3362..0f87d13a5a 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2316,7 +2316,7 @@ struct remote_domain_migrate_perform3_args {
         remote_string              uri;
         uint64_t                   flags;
         remote_string              dname;
-        uint64_t                   resource;
+        uint64_t                   bandwidth;
 };
 struct remote_domain_migrate_perform3_ret {
         struct {
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 1a7d09056e..dd3362c831 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -404,7 +404,7 @@ my $long_legacy = {
     DomainMigrateFinish3        => { arg => { flags => 1 } },
     DomainMigratePeer2Peer      => { arg => { flags => 1, resource => 1 } },
     DomainMigratePerform        => { arg => { flags => 1, bandwidth => 1 } },
-    DomainMigratePerform3       => { arg => { flags => 1, resource => 1 } },
+    DomainMigratePerform3       => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepare        => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepare2       => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepare3       => { arg => { flags => 1, bandwidth => 1 } },
-- 
2.49.0

Reply via email to