[PATCH] console: print countdown aborted message only once
Sascha Hauer
s.hauer at pengutronix.de
Thu Jan 23 05:11:31 PST 2025
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 at 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
More information about the barebox
mailing list