[libvirt PATCH 2/6] qemu: Use C99 initializers for qemuMigrationParamsFlagMap

Jiri Denemark posted 6 patches 9 months, 1 week ago
[libvirt PATCH 2/6] qemu: Use C99 initializers for qemuMigrationParamsFlagMap
Posted by Jiri Denemark 9 months, 1 week ago
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration_params.c | 50 ++++++++++++++++----------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index 9de6c08021..b02a8af8d5 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -175,35 +175,35 @@ static const qemuMigrationParamsAlwaysOnItem qemuMigrationParamsAlwaysOn[] = {
 
 /* Translation from virDomainMigrateFlags to qemuMigrationCapability. */
 static const qemuMigrationParamsFlagMapItem qemuMigrationParamsFlagMap[] = {
-    {QEMU_MIGRATION_FLAG_REQUIRED,
-     VIR_MIGRATE_RDMA_PIN_ALL,
-     QEMU_MIGRATION_CAP_RDMA_PIN_ALL,
-     QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
-
-    {QEMU_MIGRATION_FLAG_REQUIRED,
-     VIR_MIGRATE_AUTO_CONVERGE,
-     QEMU_MIGRATION_CAP_AUTO_CONVERGE,
-     QEMU_MIGRATION_SOURCE},
+    {.match = QEMU_MIGRATION_FLAG_REQUIRED,
+     .flag = VIR_MIGRATE_RDMA_PIN_ALL,
+     .cap = QEMU_MIGRATION_CAP_RDMA_PIN_ALL,
+     .party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
 
-    {QEMU_MIGRATION_FLAG_REQUIRED,
-     VIR_MIGRATE_POSTCOPY,
-     QEMU_MIGRATION_CAP_POSTCOPY,
-     QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
+    {.match = QEMU_MIGRATION_FLAG_REQUIRED,
+     .flag = VIR_MIGRATE_AUTO_CONVERGE,
+     .cap = QEMU_MIGRATION_CAP_AUTO_CONVERGE,
+     .party = QEMU_MIGRATION_SOURCE},
 
-    {QEMU_MIGRATION_FLAG_REQUIRED,
-     VIR_MIGRATE_PARALLEL,
-     QEMU_MIGRATION_CAP_MULTIFD,
-     QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
+    {.match = QEMU_MIGRATION_FLAG_REQUIRED,
+     .flag = VIR_MIGRATE_POSTCOPY,
+     .cap = QEMU_MIGRATION_CAP_POSTCOPY,
+     .party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
 
-    {QEMU_MIGRATION_FLAG_FORBIDDEN,
-     VIR_MIGRATE_TUNNELLED,
-     QEMU_MIGRATION_CAP_RETURN_PATH,
-     QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
+    {.match = QEMU_MIGRATION_FLAG_REQUIRED,
+     .flag = VIR_MIGRATE_PARALLEL,
+     .cap = QEMU_MIGRATION_CAP_MULTIFD,
+     .party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
 
-    {QEMU_MIGRATION_FLAG_REQUIRED,
-     VIR_MIGRATE_ZEROCOPY,
-     QEMU_MIGRATION_CAP_ZERO_COPY_SEND,
-     QEMU_MIGRATION_SOURCE},
+    {.match = QEMU_MIGRATION_FLAG_FORBIDDEN,
+     .flag = VIR_MIGRATE_TUNNELLED,
+     .cap = QEMU_MIGRATION_CAP_RETURN_PATH,
+     .party = QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
+
+    {.match = QEMU_MIGRATION_FLAG_REQUIRED,
+     .flag = VIR_MIGRATE_ZEROCOPY,
+     .cap = QEMU_MIGRATION_CAP_ZERO_COPY_SEND,
+     .party = QEMU_MIGRATION_SOURCE},
 };
 
 /* Translation from VIR_MIGRATE_PARAM_* typed parameters to
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 2/6] qemu: Use C99 initializers for qemuMigrationParamsFlagMap
Posted by Peter Krempa 9 months, 1 week ago
On Mon, Jan 08, 2024 at 18:06:38 +0100, Jiri Denemark wrote:
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/qemu/qemu_migration_params.c | 50 ++++++++++++++++----------------
>  1 file changed, 25 insertions(+), 25 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org