From f4da5ed538f8242c4eb78481e7693c47a8f26284 Mon Sep 17 00:00:00 2001 From: Michael Ferrari Date: Tue, 8 Oct 2024 18:58:04 +0200 Subject: [PATCH] firstboot: clean up welcome message --- src/firstboot/firstboot.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 6bec3ca6510..2877623ae96 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -104,8 +104,10 @@ static void print_welcome(int rfd) { if (!arg_welcome) return; - if (done) + if (done) { + putchar('\n'); /* Add some breathing room between multiple prompts */ return; + } r = parse_os_release_at(rfd, "PRETTY_NAME", &pretty_name, @@ -614,7 +616,6 @@ static int prompt_hostname(int rfd) { } print_welcome(rfd); - putchar('\n'); for (;;) { _cleanup_free_ char *h = NULL; @@ -728,7 +729,6 @@ static int prompt_root_password(int rfd) { } print_welcome(rfd); - putchar('\n'); msg1 = strjoina(special_glyph(SPECIAL_GLYPH_TRIANGULAR_BULLET), " Please enter a new root password (empty to skip):"); msg2 = strjoina(special_glyph(SPECIAL_GLYPH_TRIANGULAR_BULLET), " Please enter new root password again:"); @@ -821,7 +821,6 @@ static int prompt_root_shell(int rfd) { } print_welcome(rfd); - putchar('\n'); for (;;) { _cleanup_free_ char *s = NULL; -- 2.47.3