Merge pull request #7566 from yuwata/fix-bootspec-default-entry

bootspec: fix debug message about default entry
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2017-12-07 08:49:11 +01:00 committed by GitHub
commit 00562cc356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -346,7 +346,7 @@ static int boot_entries_uniquify(BootEntry *entries, size_t n_entries) {
return 0;
}
int boot_entries_select_default(const BootConfig *config) {
static int boot_entries_select_default(const BootConfig *config) {
int i;
if (config->entry_oneshot)
@ -374,7 +374,7 @@ int boot_entries_select_default(const BootConfig *config) {
}
if (config->n_entries > 0)
log_debug("Found default: last entry \"%s\"", config->entries[i].filename);
log_debug("Found default: last entry \"%s\"", config->entries[config->n_entries - 1].filename);
else
log_debug("Found no default boot entry :(");
return config->n_entries - 1; /* -1 means "no default" */

View File

@ -52,7 +52,6 @@ typedef struct BootConfig {
void boot_entry_free(BootEntry *entry);
int boot_entry_load(const char *path, BootEntry *entry);
int boot_entries_find(const char *dir, BootEntry **entries, size_t *n_entries);
int boot_entries_select_default(const BootConfig *config);
int boot_loader_read_conf(const char *path, BootConfig *config);
void boot_config_free(BootConfig *config);