Skip to contentSkip to conversation

runqemu: fix snapshot status log format

PATCH New Gyorgy Sarvari 1 participant 1 message Sep 1, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runqemu: fix snapshot status log format

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.

---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
scripts/runqemu +4 -3
index 827300080a..fd61f3b605 100755
@@ -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):