From: Michal Privoznik <mpriv...@redhat.com> 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 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 c0099198bb..3f367806ee 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -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, diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 293a11be4e..df99fe260c 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -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, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6b8f60cc23..a89b78d5d8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10961,7 +10961,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; diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 12ad1ce548..2abfe7bf3b 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -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 diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 815be8548d..8fd387fc1c 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -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, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index f6d0ad30b6..21aaf615ba 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -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 { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 370a5e2344..63a51e3362 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -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 { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index abc260ea56..1a7d09056e 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -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 } }, -- 2.49.0