From: Michal Privoznik <mpriv...@redhat.com> The virDomainMigratePrepare2() 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 65c20cbb74..cd0b32c455 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -644,7 +644,7 @@ typedef int char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); typedef virDomainPtr diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index aead4dbfb6..626d794a8c 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -167,7 +167,7 @@ int virDomainMigratePrepare2 (virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); virDomainPtr virDomainMigrateFinish2 (virConnectPtr dconn, const char *dname, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a531bdc581..f5657dbd0e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10807,7 +10807,7 @@ qemuDomainMigratePrepare2(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 229bd677bb..7ebaca6cf1 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3125,7 +3125,7 @@ remoteDispatchDomainMigratePrepare2(virNetServer *server G_GNUC_UNUSED, if (virDomainMigratePrepare2(conn, &cookie, &cookielen, 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 1609c6b391..1d1b88df29 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2367,7 +2367,7 @@ remoteDomainMigratePrepare2(virConnectPtr dconn, char **cookie, int *cookielen, const char *uri_in, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml) { remote_domain_migrate_prepare2_args args = {0}; @@ -2378,7 +2378,7 @@ remoteDomainMigratePrepare2(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_PREPARE2, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 9210c0dc1c..ad29ecbd06 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1087,7 +1087,7 @@ struct remote_domain_migrate_prepare2_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 5c30e9d107..ced8120bab 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -664,7 +664,7 @@ struct remote_domain_migrate_prepare2_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_prepare2_ret { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index fc8e7e8891..e867dda9c9 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -406,7 +406,7 @@ my $long_legacy = { DomainMigratePerform => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePerform3 => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepare => { arg => { flags => 1, bandwidth => 1 } }, - DomainMigratePrepare2 => { arg => { flags => 1, resource => 1 } }, + DomainMigratePrepare2 => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepare3 => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepareTunnel => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepareTunnel3 => { arg => { flags => 1, resource => 1 } }, -- 2.49.0