From: Lennart Poettering Date: Tue, 19 May 2026 13:50:39 +0000 (+0200) Subject: firstboot: prefill language prompt with firmware language if it makes X-Git-Tag: v261-rc1~66^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=460dab3936180a2d340bedc8d849175e809cfcae;p=thirdparty%2Fsystemd.git firstboot: prefill language prompt with firmware language if it makes sense --- diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 470caf8283f..754c82ace07 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -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,