bootctl: removed unused parameter only_auto

Remove the parameter 'only_auto' from the function
boot_entries_augment_from_loader() because each caller set it always to
true.

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
This commit is contained in:
Goffredo Baroncelli
2022-01-18 19:32:35 +01:00
parent 9914d89b51
commit 2fbf50d675
4 changed files with 11 additions and 7 deletions
+7 -3
View File
@@ -759,8 +759,7 @@ int boot_entries_load_config_auto(
int boot_entries_augment_from_loader(
BootConfig *config,
char **found_by_loader,
bool only_auto) {
char **found_by_loader) {
static const char *const title_table[] = {
/* Pretty names for a few well-known automatically discovered entries. */
@@ -785,7 +784,12 @@ int boot_entries_augment_from_loader(
if (boot_config_has_entry(config, *i))
continue;
if (only_auto && !startswith(*i, "auto-"))
/*
* consider the 'auto-' entries only, because the others
* ones are detected scanning the 'esp' and 'xbootldr'
* directories by boot_entries_load_config()
*/
if (!startswith(*i, "auto-"))
continue;
c = strdup(*i);
+1 -1
View File
@@ -76,7 +76,7 @@ static inline BootEntry* boot_config_default_entry(BootConfig *config) {
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);
int boot_entries_augment_from_loader(BootConfig *config, char **list);
static inline const char* boot_entry_title(const BootEntry *entry) {
return entry->show_title ?: entry->title ?: entry->id;