diff mbox series

[v5,4/4] runqemu: print snapshot mode state in console

Message ID 20250731153313.3693397-4-yoann.congal@smile.fr
State New
Headers show
Series [v5,1/4] runqemu: Add support for running compressed .zst rootfs images | expand

Commit Message

Yoann Congal July 31, 2025, 3:33 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

With snapshot enabled, no change on rootfs will be saved after qemu
shutdown. Since this is not what a user might expect, print the snapshot
mode state and its consequence in console at runqemu start.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
v4: reformat message handling
---
 scripts/runqemu | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index da53265219..a57fe794dc 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1053,6 +1053,9 @@  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.")
         if self.ovmf_bios:
             logoutput.append('OVMF: %s' % self.ovmf_bios)
         if (self.ovmf_secboot_pkkek1):