diff mbox series

runqemu: fix snapshot status log format

Message ID 20250901155512.869106-1-skandigraun@gmail.com
State New
Headers show
Series runqemu: fix snapshot status log format | expand

Commit Message

Gyorgy Sarvari Sept. 1, 2025, 3:55 p.m. UTC
The snapshot status is diisplayed incorrectly, in case snasphot is disabled.

Enabled state:
SNAPSHOT: [Enabled. Changes on rootfs won't be kept after QEMU shutdown.]

Disabled state:
Disabled. Changes on rootfs will be kept after QEMU shutdown.

Fix the log output to make them have the same format.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 827300080a..fd61f3b605 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1054,9 +1054,10 @@  to your build configuration.
             logoutput.append('NFS_DIR: [%s]' % self.rootfs)
         else:
             logoutput.append('ROOTFS: [%s]' % self.rootfs)
-        logoutput.append('SNAPSHOT: [%s]' %
-                         "Enabled. Changes on rootfs won't be kept after QEMU shutdown." if self.snapshot
-                         else "Disabled. Changes on rootfs will be kept after QEMU shutdown.")
+
+        logoutput.append(f'SNAPSHOT: [{"Enabled. Changes on rootfs won't be kept after QEMU shutdown." if self.snapshot 
+                         else "Disabled. Changes on rootfs will be kept after QEMU shutdown."}]')
+
         if self.ovmf_bios:
             logoutput.append('OVMF: %s' % self.ovmf_bios)
         if (self.ovmf_secboot_pkkek1):