]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
firstboot: prefill language prompt with firmware language if it makes
authorLennart Poettering <lennart@amutable.com>
Tue, 19 May 2026 13:50:39 +0000 (15:50 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 20 May 2026 14:38:19 +0000 (16:38 +0200)
sense

src/firstboot/firstboot.c

index 470caf8283f2b59c870e9c322a1ffe7bbddb0e46..754c82ace0718ddb383a543e0c487b4474273d48 100644 (file)
@@ -293,9 +293,12 @@ static int prompt_locale(int rfd, sd_varlink **mute_console_link) {
         } else {
                 print_welcome(rfd, mute_console_link);
 
+                _cleanup_free_ char *prefill = NULL;
+                (void) locale_lang_from_efi(&prefill, LOCALE_REQUIRE_INSTALLED|LOCALE_SUPPRESS_EN_US);
+
                 r = prompt_loop("Please enter the new system locale name or number",
                                 GLYPH_WORLD,
-                                /* prefill= */ NULL,
+                                prefill,
                                 locales,
                                 /* accepted= */ NULL,
                                 /* ellipsize_percentage= */ 60,