From: Michal Privoznik <mpriv...@redhat.com> The virDomainMigratePrepare() 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/esx/esx_driver.c | 2 +- src/libvirt_internal.h | 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 8e080620bb..fa2c08391f 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -584,7 +584,7 @@ typedef int char **uri_out, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); typedef int (*virDrvDomainMigratePerform)(virDomainPtr domain, diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 512ca6c028..34c0e28d31 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -3614,7 +3614,7 @@ esxDomainMigratePrepare(virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname G_GNUC_UNUSED, - unsigned long resource G_GNUC_UNUSED) + unsigned long bandwidth G_GNUC_UNUSED) { esxPrivate *priv = dconn->privateData; diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 1ae3e2b2e0..c532218226 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -146,7 +146,7 @@ int virDomainMigratePrepare (virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); int virDomainMigratePerform (virDomainPtr domain, const char *cookie, int cookielen, diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 5dfed7ceef..229bd677bb 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3075,7 +3075,7 @@ remoteDispatchDomainMigratePrepare(virNetServer *server G_GNUC_UNUSED, if (virDomainMigratePrepare(conn, &cookie, &cookielen, uri_in, uri_out, - args->flags, dname, args->resource) < 0) + args->flags, dname, args->bandwidth) < 0) goto cleanup; /* remoteDispatchClientRequest will free cookie, uri_out and diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 2690c05267..1609c6b391 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2333,7 +2333,7 @@ remoteDomainMigratePrepare(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) { remote_domain_migrate_prepare_args args = {0}; g_auto(remote_domain_migrate_prepare_ret) ret = {0}; @@ -2343,7 +2343,7 @@ remoteDomainMigratePrepare(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; if (call(dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE, (xdrproc_t) xdr_remote_domain_migrate_prepare_args, (char *) &args, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 57cd5796af..2dc0a6fea6 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1055,7 +1055,7 @@ struct remote_domain_migrate_prepare_args { remote_string uri_in; unsigned hyper flags; remote_string dname; - unsigned hyper resource; + unsigned hyper bandwidth; }; struct remote_domain_migrate_prepare_ret { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index dd612b4dc6..50fcdaa134 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -628,7 +628,7 @@ struct remote_domain_migrate_prepare_args { remote_string uri_in; uint64_t flags; remote_string dname; - uint64_t resource; + uint64_t bandwidth; }; struct remote_domain_migrate_prepare_ret { struct { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index f9fae39fb1..2b7fd657cb 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -405,7 +405,7 @@ my $long_legacy = { DomainMigratePeer2Peer => { arg => { flags => 1, resource => 1 } }, DomainMigratePerform => { arg => { flags => 1, resource => 1 } }, DomainMigratePerform3 => { arg => { flags => 1, resource => 1 } }, - DomainMigratePrepare => { arg => { flags => 1, resource => 1 } }, + DomainMigratePrepare => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepare2 => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepare3 => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepareTunnel => { arg => { flags => 1, resource => 1 } }, -- 2.49.0