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

The virDomainMigratePrepare3() API declares one of its 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              | 2 +-
 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, 9 insertions(+), 9 deletions(-)

diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h
index 975a6b9700..8302f0b42e 100644
--- a/src/driver-hypervisor.h
+++ b/src/driver-hypervisor.h
@@ -993,7 +993,7 @@ typedef int
                                char **uri_out,
                                unsigned long flags,
                                const char *dname,
-                               unsigned long resource,
+                               unsigned long bandwidth,
                                const char *dom_xml);
 
 typedef int
diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h
index 51510c34b3..62ba807ec5 100644
--- a/src/libvirt_internal.h
+++ b/src/libvirt_internal.h
@@ -201,7 +201,7 @@ int virDomainMigratePrepare3(virConnectPtr dconn,
                              char **uri_out,
                              unsigned long flags,
                              const char *dname,
-                             unsigned long resource,
+                             unsigned long bandwidth,
                              const char *dom_xml);
 
 int virDomainMigratePrepareTunnel3(virConnectPtr dconn,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c6ace58491..dda0a32681 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11037,7 +11037,7 @@ qemuDomainMigratePrepare3(virConnectPtr dconn,
                           char **uri_out,
                           unsigned long flags,
                           const char *dname,
-                          unsigned long resource G_GNUC_UNUSED,
+                          unsigned long bandwidth G_GNUC_UNUSED,
                           const char *dom_xml)
 {
     virQEMUDriver *driver = dconn->privateData;
diff --git a/src/remote/remote_daemon_dispatch.c 
b/src/remote/remote_daemon_dispatch.c
index 7ebaca6cf1..12ad1ce548 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -4855,7 +4855,7 @@ remoteDispatchDomainMigratePrepare3(virNetServer *server 
G_GNUC_UNUSED,
                                  args->cookie_in.cookie_in_len,
                                  &cookieout, &cookieoutlen,
                                  uri_in, uri_out,
-                                 args->flags, dname, args->resource,
+                                 args->flags, dname, args->bandwidth,
                                  args->dom_xml) < 0)
         goto cleanup;
 
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 1d1b88df29..42f98f132f 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5691,7 +5691,7 @@ remoteDomainMigratePrepare3(virConnectPtr dconn,
                             char **uri_out,
                             unsigned long flags,
                             const char *dname,
-                            unsigned long resource,
+                            unsigned long bandwidth,
                             const char *dom_xml)
 {
     remote_domain_migrate_prepare3_args args = {0};
@@ -5704,7 +5704,7 @@ remoteDomainMigratePrepare3(virConnectPtr dconn,
     args.uri_in = uri_in == NULL ? NULL : (char **) &uri_in;
     args.flags = flags;
     args.dname = dname == NULL ? NULL : (char **) &dname;
-    args.resource = resource;
+    args.bandwidth = bandwidth;
     args.dom_xml = (char *) dom_xml;
 
     if (call(dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE3,
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 9457bb603d..a56b4cdeb9 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -2960,7 +2960,7 @@ struct remote_domain_migrate_prepare3_args {
     remote_string uri_in;
     unsigned hyper flags;
     remote_string dname;
-    unsigned hyper resource;
+    unsigned hyper bandwidth;
     remote_nonnull_string dom_xml;
 };
 
diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs
index 6cf7b8e9e3..e3d16ea061 100644
--- a/src/remote_protocol-structs
+++ b/src/remote_protocol-structs
@@ -2279,7 +2279,7 @@ struct remote_domain_migrate_prepare3_args {
         remote_string              uri_in;
         uint64_t                   flags;
         remote_string              dname;
-        uint64_t                   resource;
+        uint64_t                   bandwidth;
         remote_nonnull_string      dom_xml;
 };
 struct remote_domain_migrate_prepare3_ret {
diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl
index 0cc4d3fe42..4c699337b1 100755
--- a/src/rpc/gendispatch.pl
+++ b/src/rpc/gendispatch.pl
@@ -407,7 +407,7 @@ my $long_legacy = {
     DomainMigratePerform3       => { arg => { flags => 1, resource => 1 } },
     DomainMigratePrepare        => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepare2       => { arg => { flags => 1, bandwidth => 1 } },
-    DomainMigratePrepare3       => { arg => { flags => 1, resource => 1 } },
+    DomainMigratePrepare3       => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepareTunnel  => { arg => { flags => 1, bandwidth => 1 } },
     DomainMigratePrepareTunnel3 => { arg => { flags => 1, resource => 1 } },
     DomainMigrateToURI          => { arg => { flags => 1, resource => 1 } },
-- 
2.49.0

Reply via email to