]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: let's make the one space we output early on invisible 39026/head
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Sep 2025 13:32:29 +0000 (15:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 24 Sep 2025 10:33:59 +0000 (12:33 +0200)
let's place the cursor at the beginning of the line before/after, so we
know it's the first char we overwrite, and we return to the front again
right after.

src/boot/boot.c

index 0c88b05a413138b6a13295ff69a26ef451d2e71c..b168eba01c5abe43886cca0d33edc8cd38c406c0 100644 (file)
@@ -495,8 +495,9 @@ static bool menu_run(
         ST->ConIn->Reset(ST->ConIn, false);
         ST->ConOut->EnableCursor(ST->ConOut, false);
 
-        /* draw a single character to make ClearScreen work on some firmware */
-        ST->ConOut->OutputString(ST->ConOut, (char16_t *) u" ");
+        /* Draw a single character to the beginning of a line, in order to make ClearScreen() work on certain
+         * broken firmware. And let's immediately move back to the beginning of the line. */
+        printf("\r \r");
 
         err = console_set_mode(config->console_mode_efivar != CONSOLE_MODE_KEEP ?
                                config->console_mode_efivar : config->console_mode);