firstboot: add newline before key wait
authorMichael Ferrari <nekkodroid404@gmail.com>
Wed, 5 Jun 2024 17:33:19 +0000 (19:33 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Sep 2024 01:08:38 +0000 (10:08 +0900)
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

index c452ca5975695d3902f2e17f7d93fa79a6bb99fe..af17b527c1575f6c05d8f22e7856d97ae7bfb401 100644 (file)
@@ -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);