From: Michal Privoznik Date: Thu, 5 Jun 2025 08:17:45 +0000 (+0200) Subject: src: Unify argument name of virDomainMigratePrepareTunnel3() X-Git-Tag: v11.6.0-rc1~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=767b2b72e7b91a5cb1a8b6a6f907c5cae25e8367;p=thirdparty%2Flibvirt.git src: Unify argument name of virDomainMigratePrepareTunnel3() The virDomainMigratePrepareTunnel3() 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 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 8302f0b42e..c0099198bb 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -1005,7 +1005,7 @@ typedef int int *cookieoutlen, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 62ba807ec5..293a11be4e 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -212,7 +212,7 @@ int virDomainMigratePrepareTunnel3(virConnectPtr dconn, int *cookieoutlen, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a6451077c1..b2f7e76fd6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11192,7 +11192,7 @@ qemuDomainMigratePrepareTunnel3(virConnectPtr dconn, int *cookieoutlen, 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_driver.c b/src/remote/remote_driver.c index 42f98f132f..815be8548d 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -5744,7 +5744,7 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn, int *cookieoutlen, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml) { struct private_data *priv = dconn->privateData; @@ -5769,7 +5769,7 @@ remoteDomainMigratePrepareTunnel3(virConnectPtr dconn, args.cookie_in.cookie_in_len = cookieinlen; 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_PREPARE_TUNNEL3, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index a56b4cdeb9..f6d0ad30b6 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -2973,7 +2973,7 @@ struct remote_domain_migrate_prepare_tunnel3_args { opaque cookie_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 e3d16ea061..370a5e2344 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2296,7 +2296,7 @@ struct remote_domain_migrate_prepare_tunnel3_args { } cookie_in; uint64_t flags; remote_string dname; - uint64_t resource; + uint64_t bandwidth; remote_nonnull_string dom_xml; }; struct remote_domain_migrate_prepare_tunnel3_ret { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 4c699337b1..abc260ea56 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -409,7 +409,7 @@ my $long_legacy = { DomainMigratePrepare2 => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepare3 => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepareTunnel => { arg => { flags => 1, bandwidth => 1 } }, - DomainMigratePrepareTunnel3 => { arg => { flags => 1, resource => 1 } }, + DomainMigratePrepareTunnel3 => { arg => { flags => 1, bandwidth => 1 } }, DomainMigrateToURI => { arg => { flags => 1, resource => 1 } }, DomainMigrateToURI2 => { arg => { flags => 1, resource => 1 } }, DomainMigrateVersion1 => { arg => { flags => 1, resource => 1 } },