From b7c0d924bd9802cb3dee0f463d7027dd67d61b2c Mon Sep 17 00:00:00 2001 From: Michael Ferrari Date: Wed, 5 Jun 2024 19:33:19 +0200 Subject: [PATCH] firstboot: add newline before key wait When sd-firstboot is ran during first boot of a new system this missing newline leads to a bootup message being appended on the same line as the message instructing to press a key. --- src/firstboot/firstboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index c452ca59756..af17b527c15 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -97,8 +97,7 @@ static bool press_any_key(void) { char k = 0; bool need_nl = true; - printf("-- Press any key to proceed --"); - fflush(stdout); + puts("-- Press any key to proceed --"); (void) read_one_char(stdin, &k, USEC_INFINITY, &need_nl); -- 2.47.3