mirror of
https://github.com/systemd/systemd.git
synced 2025-01-06 17: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);
|
assert(config);
|
||||||
|
|
||||||
i = config_find_entry(config, config->entry_oneshot);
|
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;
|
config->idx_default = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
i = config_find_entry(config, config->use_saved_entry_efivar ? config->entry_saved : config->entry_default_efivar);
|
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 = i;
|
||||||
config->idx_default_efivar = i;
|
config->idx_default_efivar = i;
|
||||||
return;
|
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);
|
i = config->use_saved_entry_efivar ? IDX_INVALID : config_find_entry(config, config->entry_saved);
|
||||||
else
|
else
|
||||||
i = config_find_entry(config, config->entry_default_config);
|
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;
|
config->idx_default = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* select the first suitable entry */
|
/* select the first suitable entry */
|
||||||
for (i = 0; i < config->n_entries; i++)
|
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;
|
config->idx_default = i;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user