printf("Default Boot Loader Entry:\n");
r = boot_entry_show(
- config.entries + config.default_entry,
+ boot_config_default_entry(&config),
/* show_as_default= */ false,
/* show_as_selected= */ false,
/* show_discovered= */ false);
BootEntry *entries;
size_t n_entries;
+
ssize_t default_entry;
ssize_t selected_entry;
if (config->default_entry < 0)
return NULL;
+ assert((size_t) config->default_entry < config->n_entries);
return config->entries + config->default_entry;
}
void boot_config_free(BootConfig *config);
+
int boot_entries_load_config(const char *esp_path, const char *xbootldr_path, BootConfig *config);
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);