diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-23 17:28:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:01:36 +0200 |
commit | f7a7a5e2675fbcf227700e952c053411200d5d15 (patch) | |
tree | 73e77f4b9df3a857d7d604e17732a66d13f425f3 /src/shared/bootspec.h | |
parent | 92067ab672f1fcdfd31dfd41f6bca37e2fcc9e95 (diff) | |
download | systemd-f7a7a5e2675fbcf227700e952c053411200d5d15.tar.gz |
bootspec: assess default/selected entries *after* we augmented entry list with entries from loader
Fixes: #22580
Diffstat (limited to 'src/shared/bootspec.h')
-rw-r--r-- | src/shared/bootspec.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index 720aa0484f..5c4b211ee4 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -62,6 +62,12 @@ typedef struct BootConfig { Set *inodes_seen; } BootConfig; +#define BOOT_CONFIG_NULL \ + { \ + .default_entry = -1, \ + .selected_entry = -1, \ + } + static inline BootEntry* boot_config_find_entry(BootConfig *config, const char *id) { assert(config); assert(id); @@ -88,6 +94,8 @@ int boot_entries_load_config(const char *esp_path, const char *xbootldr_path, Bo int boot_entries_load_config_auto(const char *override_esp_path, const char *override_xbootldr_path, BootConfig *config); int boot_entries_augment_from_loader(BootConfig *config, char **list, bool only_auto); +int boot_config_select_special_entries(BootConfig *config); + static inline const char* boot_entry_title(const BootEntry *entry) { assert(entry); |