summaryrefslogtreecommitdiffstats
path: root/src/firstboot/firstboot.c
diff options
context:
space:
mode:
authorMichael Ferrari <nekkodroid404@gmail.com>2024-06-05 19:33:19 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-09-05 03:08:38 +0200
commitb7c0d924bd9802cb3dee0f463d7027dd67d61b2c (patch)
treebe43b5eb44bf460e519edcaa3a61baeec09f3a6b /src/firstboot/firstboot.c
parenttest: add test cases of "systemctl cat" for nonexistent units (diff)
downloadsystemd-b7c0d924bd9802cb3dee0f463d7027dd67d61b2c.tar.xz
systemd-b7c0d924bd9802cb3dee0f463d7027dd67d61b2c.zip
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.
Diffstat (limited to 'src/firstboot/firstboot.c')
-rw-r--r--src/firstboot/firstboot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index c452ca5975..af17b527c1 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);