From: Michal Privoznik Date: Thu, 5 Jun 2025 07:48:14 +0000 (+0200) Subject: src: Unify argument name of virDomainMigratePrepare3() X-Git-Tag: v11.6.0-rc1~195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45d4a7bf578170b4a3c12b4e16e6ac78a89ac763;p=thirdparty%2Flibvirt.git src: Unify argument name of virDomainMigratePrepare3() The virDomainMigratePrepare3() 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 975a6b9700..8302f0b42e 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -993,7 +993,7 @@ typedef int char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); typedef int diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 51510c34b3..62ba807ec5 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -201,7 +201,7 @@ int virDomainMigratePrepare3(virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml); int virDomainMigratePrepareTunnel3(virConnectPtr dconn, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6a5f76cdb5..a6451077c1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11041,7 +11041,7 @@ qemuDomainMigratePrepare3(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 7ebaca6cf1..12ad1ce548 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -4855,7 +4855,7 @@ remoteDispatchDomainMigratePrepare3(virNetServer *server G_GNUC_UNUSED, args->cookie_in.cookie_in_len, &cookieout, &cookieoutlen, 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 1d1b88df29..42f98f132f 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -5691,7 +5691,7 @@ remoteDomainMigratePrepare3(virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, const char *dom_xml) { remote_domain_migrate_prepare3_args args = {0}; @@ -5704,7 +5704,7 @@ remoteDomainMigratePrepare3(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_PREPARE3, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 9457bb603d..a56b4cdeb9 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -2960,7 +2960,7 @@ struct remote_domain_migrate_prepare3_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 6cf7b8e9e3..e3d16ea061 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -2279,7 +2279,7 @@ struct remote_domain_migrate_prepare3_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_prepare3_ret { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 0cc4d3fe42..4c699337b1 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -407,7 +407,7 @@ my $long_legacy = { DomainMigratePerform3 => { arg => { flags => 1, resource => 1 } }, DomainMigratePrepare => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepare2 => { arg => { flags => 1, bandwidth => 1 } }, - DomainMigratePrepare3 => { arg => { flags => 1, resource => 1 } }, + DomainMigratePrepare3 => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepareTunnel => { arg => { flags => 1, bandwidth => 1 } }, DomainMigratePrepareTunnel3 => { arg => { flags => 1, resource => 1 } }, DomainMigrateToURI => { arg => { flags => 1, resource => 1 } },