]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: show platform lang in bootctl status output
authorLennart Poettering <lennart@amutable.com>
Tue, 19 May 2026 13:50:35 +0000 (15:50 +0200)
committerLennart Poettering <lennart@amutable.com>
Wed, 20 May 2026 14:38:19 +0000 (16:38 +0200)
src/bootctl/bootctl-status.c

index 4cd0e3aca0e750d9187294bdb9d0ce921b24c8d0..4aac25a74dc42ddbdeea86fb333da505d83bdbd8 100644 (file)
@@ -17,6 +17,7 @@
 #include "efivars.h"
 #include "errno-util.h"
 #include "fd-util.h"
+#include "locale-setup.h"
 #include "log.h"
 #include "pager.h"
 #include "pretty-print.h"
@@ -501,6 +502,18 @@ int verb_status(int argc, char *argv[], uintptr_t _data, void *userdata) {
                         errno = -k;
                         printf("  Boot into FW: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
                 }
+
+                _cleanup_free_ char *lang = NULL;
+                k = locale_lang_from_efi(&lang, /* flags= */ 0);
+                if (k > 0)
+                        printf(" Platform Lang: %s\n", lang);
+                else if (k == 0)
+                        printf(" Platform Lang: n/a\n");
+                else {
+                        errno = -k;
+                        printf(" Platform Lang: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
+                }
+
                 printf("\n");
 
                 if (loader) {