bootctl: also print .uname if present

A UKI might have a version from .osrelease which is not tied to the
kernel version. Pretty print the .uname section too, if present.

         type: Boot Loader Specification Type #2 (UKI, .efi)
        title: Debian GNU/Linux 13 (trixie) (34.186) (selected)
           id: debian-trixie_34.186_x86-64.efi
       source: /boot/efi//EFI/Linux/debian-trixie_34.186_x86-64.efi (on the EFI System Partition)
     sort-key: debian-trixie
      version: 34.186
        uname: 6.12.100+deb13-amd64
        linux: /boot/efi//EFI/Linux/debian-trixie_34.186_x86-64.efi
      profile: 0
This commit is contained in:
Luca Boccassi
2026-08-07 14:19:42 +09:00
committed by Yu Watanabe
parent 5f2ec114b3
commit bf031984ff
4 changed files with 34 additions and 7 deletions
+2 -1
View File
@@ -55,6 +55,7 @@ typedef struct BootEntry {
char *show_title;
char *sort_key;
char *version;
char *uname;
char *machine_id;
char *architecture;
char **options;
@@ -175,6 +176,6 @@ int boot_filename_extract_tries(const char *fname, char **ret_stripped, unsigned
int boot_entry_to_json(const BootConfig *c, size_t i, sd_json_variant **ret);
int pe_find_uki_sections(int fd, const char *path, unsigned profile, char **ret_osrelease, char **ret_profile, char **ret_cmdline);
int pe_find_uki_sections(int fd, const char *path, unsigned profile, char **ret_osrelease, char **ret_profile, char **ret_cmdline, char **ret_uname);
int bootspec_extract_osrelease(const char *text, char **ret_good_name, char **ret_good_version, char **ret_good_sort_key, char **ret_os_id, char **ret_os_version_id, char **ret_image_id, char **ret_image_version);