Sam Protsenko af38567cad autoboot: Fix inconsistent countdown output
Commit 5f70be08b015 ("Fix autoboot countdown printing wrong") introduces
inconsistency in how the countdown is displayed. For example, in case
when BOOTDELAY=5, the next output is observed during the boot:

    Hit any key to stop autoboot:  5
    Hit any key to stop autoboot: 4
    Hit any key to stop autoboot: 3

That happens due to different printf format (%2d vs %1d). Moreover, the
mentioned commit fails to handle the case when the user is holding some
key before the countdown is shown. E.g. if BOOTDELAY=101, the next
malformed output is being produced:

    Hit any key to stop autoboot: 1 0

That's because the fast path code wasn't modified accordingly, and still
tries to erase the number using '\b\b\b' format.

Fix both issues by introducing a dedicated routine for printing the
whole countdown line.

Fixes: 5f70be08b015 ("Fix autoboot countdown printing wrong")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: David Zang <davidzangcs@gmail.com>
2025-12-05 16:23:54 -06:00
..
2025-11-18 20:07:41 +01:00
2025-11-10 11:30:56 -06:00
2024-11-03 21:27:12 -06:00
2025-07-28 08:53:20 -06:00
2025-04-08 16:23:51 -06:00
2025-12-04 09:38:58 -06:00
2024-07-15 12:12:17 -06:00
2024-07-15 12:12:17 -06:00
2025-01-26 11:06:56 +01:00
2025-06-23 16:15:23 -06:00
2024-07-15 12:12:17 -06:00