From: Simon Glass <sjg@chromium.org>
Date: Mon, 28 Feb 2022 22:13:45 +0000 (-0700)
Subject: sandbox: Show a message when writing out the ram buffer
X-Git-Tag: v2025.01-rc5-pxa1908~1478^2~11^2~26
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/%7B%7B?a=commitdiff_plain;h=d02f99dd6716f6e55efe41ea2fa3cd60b03fa4af;p=u-boot.git

sandbox: Show a message when writing out the ram buffer

If state is not being written, but RAM is, we should still show a message,
so it is clear that this is happening.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index ce904b1740..e0d01125bb 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -421,7 +421,8 @@ int state_uninit(void)
 {
 	int err;
 
-	log_info("Writing sandbox state\n");
+	if (state->write_ram_buf || state->write_state)
+		log_info("Writing sandbox state\n");
 	state = &main_state;
 
 	/* Finish the bloblist, so that it is correct before writing memory */