[PATCH 5/5] qemu: monitor: Split up enum strings definitions

Peter Krempa pkrempa at redhat.com
Mon Jul 25 12:45:22 UTC 2022


The VIR_ENUM_IMPL macros directly above them list one string per line.
Use the same also for qemuMonitorMigrationStatus and
qemuMonitorVMStatus.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/qemu/qemu_monitor.c | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 9687746703..6ebdeb46f3 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -144,20 +144,37 @@ VIR_ENUM_IMPL(qemuMonitorCPUProperty,

 VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
               QEMU_MONITOR_MIGRATION_STATUS_LAST,
-              "inactive", "setup",
-              "active", "pre-switchover",
-              "device", "postcopy-active",
-              "postcopy-paused", "postcopy-recover",
-              "completed", "failed",
-              "cancelling", "cancelled",
+              "inactive",
+              "setup",
+              "active",
+              "pre-switchover",
+              "device",
+              "postcopy-active",
+              "postcopy-paused",
+              "postcopy-recover",
+              "completed",
+              "failed",
+              "cancelling",
+              "cancelled",
               "wait-unplug",
 );

 VIR_ENUM_IMPL(qemuMonitorVMStatus,
               QEMU_MONITOR_VM_STATUS_LAST,
-              "debug", "inmigrate", "internal-error", "io-error", "paused",
-              "postmigrate", "prelaunch", "finish-migrate", "restore-vm",
-              "running", "save-vm", "shutdown", "watchdog", "guest-panicked",
+              "debug",
+              "inmigrate",
+              "internal-error",
+              "io-error",
+              "paused",
+              "postmigrate",
+              "prelaunch",
+              "finish-migrate",
+              "restore-vm",
+              "running",
+              "save-vm",
+              "shutdown",
+              "watchdog",
+              "guest-panicked",
 );

 typedef enum {
-- 
2.36.1



More information about the libvir-list mailing list