mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
Revert "bootctl: Ignore boot entries (continue #22041)"
This commit is contained in:
parent
fdf9de694f
commit
9951736b7f
@ -1606,7 +1606,7 @@ static int verb_list(int argc, char *argv[], void *userdata) {
|
|||||||
else if (r < 0)
|
else if (r < 0)
|
||||||
log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m");
|
log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m");
|
||||||
else
|
else
|
||||||
(void) boot_entries_augment_from_loader(&config, efi_entries);
|
(void) boot_entries_augment_from_loader(&config, efi_entries, false);
|
||||||
|
|
||||||
if (config.n_entries == 0)
|
if (config.n_entries == 0)
|
||||||
log_info("No boot loader entries found.");
|
log_info("No boot loader entries found.");
|
||||||
|
@ -2923,7 +2923,7 @@ static int boot_loader_entry_exists(Manager *m, const char *id) {
|
|||||||
|
|
||||||
r = manager_read_efi_boot_loader_entries(m);
|
r = manager_read_efi_boot_loader_entries(m);
|
||||||
if (r >= 0)
|
if (r >= 0)
|
||||||
(void) boot_entries_augment_from_loader(&config, m->efi_boot_loader_entries);
|
(void) boot_entries_augment_from_loader(&config, m->efi_boot_loader_entries, true);
|
||||||
|
|
||||||
return boot_config_has_entry(&config, id);
|
return boot_config_has_entry(&config, id);
|
||||||
}
|
}
|
||||||
@ -3081,7 +3081,7 @@ static int property_get_boot_loader_entries(
|
|||||||
|
|
||||||
r = manager_read_efi_boot_loader_entries(m);
|
r = manager_read_efi_boot_loader_entries(m);
|
||||||
if (r >= 0)
|
if (r >= 0)
|
||||||
(void) boot_entries_augment_from_loader(&config, m->efi_boot_loader_entries);
|
(void) boot_entries_augment_from_loader(&config, m->efi_boot_loader_entries, true);
|
||||||
|
|
||||||
r = sd_bus_message_open_container(reply, 'a', "s");
|
r = sd_bus_message_open_container(reply, 'a', "s");
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -759,7 +759,8 @@ int boot_entries_load_config_auto(
|
|||||||
|
|
||||||
int boot_entries_augment_from_loader(
|
int boot_entries_augment_from_loader(
|
||||||
BootConfig *config,
|
BootConfig *config,
|
||||||
char **found_by_loader) {
|
char **found_by_loader,
|
||||||
|
bool only_auto) {
|
||||||
|
|
||||||
static const char *const title_table[] = {
|
static const char *const title_table[] = {
|
||||||
/* Pretty names for a few well-known automatically discovered entries. */
|
/* Pretty names for a few well-known automatically discovered entries. */
|
||||||
@ -784,12 +785,7 @@ int boot_entries_augment_from_loader(
|
|||||||
if (boot_config_has_entry(config, *i))
|
if (boot_config_has_entry(config, *i))
|
||||||
continue;
|
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;
|
continue;
|
||||||
|
|
||||||
c = strdup(*i);
|
c = strdup(*i);
|
||||||
|
@ -76,7 +76,7 @@ static inline BootEntry* boot_config_default_entry(BootConfig *config) {
|
|||||||
void boot_config_free(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(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_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);
|
int boot_entries_augment_from_loader(BootConfig *config, char **list, bool only_auto);
|
||||||
|
|
||||||
static inline const char* boot_entry_title(const BootEntry *entry) {
|
static inline const char* boot_entry_title(const BootEntry *entry) {
|
||||||
return entry->show_title ?: entry->title ?: entry->id;
|
return entry->show_title ?: entry->title ?: entry->id;
|
||||||
|
Loading…
Reference in New Issue
Block a user