mirror of
https://github.com/systemd/systemd.git
synced 2025-01-04 09:18:12 +03:00
Merge 82e3080305
into 1737bc0c1e
This commit is contained in:
commit
f394ee1de6
@ -1783,13 +1783,13 @@ static void config_select_default_entry(Config *config) {
|
||||
assert(config);
|
||||
|
||||
i = config_find_entry(config, config->entry_oneshot);
|
||||
if (i != IDX_INVALID) {
|
||||
if (i != IDX_INVALID || config->entries[i]->tries_left != 0) {
|
||||
config->idx_default = i;
|
||||
return;
|
||||
}
|
||||
|
||||
i = config_find_entry(config, config->use_saved_entry_efivar ? config->entry_saved : config->entry_default_efivar);
|
||||
if (i != IDX_INVALID) {
|
||||
if (i != IDX_INVALID || config->entries[i]->tries_left != 0) {
|
||||
config->idx_default = i;
|
||||
config->idx_default_efivar = i;
|
||||
return;
|
||||
@ -1800,14 +1800,14 @@ static void config_select_default_entry(Config *config) {
|
||||
i = config->use_saved_entry_efivar ? IDX_INVALID : config_find_entry(config, config->entry_saved);
|
||||
else
|
||||
i = config_find_entry(config, config->entry_default_config);
|
||||
if (i != IDX_INVALID) {
|
||||
if (i != IDX_INVALID || config->entries[i]->tries_left != 0) {
|
||||
config->idx_default = i;
|
||||
return;
|
||||
}
|
||||
|
||||
/* select the first suitable entry */
|
||||
for (i = 0; i < config->n_entries; i++)
|
||||
if (config->entries[i]->type != LOADER_AUTO && !config->entries[i]->call) {
|
||||
if (config->entries[i]->type != LOADER_AUTO && !config->entries[i]->call && config->entries[i]->tries_left != 0) {
|
||||
config->idx_default = i;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user