mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] console: print countdown aborted message only once
@ 2025-01-23 13:11 Sascha Hauer
  2025-01-28 10:30 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2025-01-23 13:11 UTC (permalink / raw)
  To: Barebox List

console_countdown_abort() can be called multiple times. Print the
message only the first time it is called.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/console_countdown.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/console_countdown.c b/common/console_countdown.c
index 1e4a1d849d..5664556422 100644
--- a/common/console_countdown.c
+++ b/common/console_countdown.c
@@ -16,7 +16,7 @@ static bool console_countdown_timeout_abort;
 
 void console_countdown_abort(const char *reason)
 {
-	if (reason)
+	if (reason && !console_countdown_timeout_abort)
 		pr_info("\nCount down aborted by %s\n", reason);
 	console_countdown_timeout_abort = true;
 }
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-28 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-23 13:11 [PATCH] console: print countdown aborted message only once Sascha Hauer
2025-01-28 10:30 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox