From: Michal Privoznik Date: Wed, 4 Jun 2025 14:28:41 +0000 (+0200) Subject: src: Unify argument name of virDomainMigrateBegin3() X-Git-Tag: v11.6.0-rc1~193 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96a5c4cb853bb0375f8de9ee8ccb749421f5020b;p=thirdparty%2Flibvirt.git src: Unify argument name of virDomainMigrateBegin3() 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 confusion. Unify the name. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- 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 b2f7e76fd6..c87e981cc0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10965,7 +10965,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 } },