[PATCH] console: print countdown aborted message only once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux