]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
firstboot: prefill keymap question with EFI provided info
authorLennart Poettering <lennart@amutable.com>
Tue, 19 May 2026 13:07:32 +0000 (15:07 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 20 May 2026 14:38:18 +0000 (16:38 +0200)
src/firstboot/firstboot.c

index ea36b910646d652d99f029853c641aad856ea280..470caf8283f2b59c870e9c322a1ffe7bbddb0e46 100644 (file)
@@ -456,10 +456,13 @@ static int prompt_keymap(int rfd, sd_varlink **mute_console_link) {
 
         print_welcome(rfd, mute_console_link);
 
+        _cleanup_free_ char *prefill = NULL;
+        (void) vconsole_keymap_from_efi(&prefill);
+
         return prompt_loop(
                         "Please enter the new keymap name or number",
                         GLYPH_KEYBOARD,
-                        /* prefill= */ NULL,
+                        prefill,
                         kmaps,
                         /* accepted= */ NULL,
                         /* ellipsize_percentage= */ 60,