mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
boot: Correctly handle @saved default patterns
(cherry picked from commit7941f11acb
) (cherry picked from commit6189505d79
)
This commit is contained in:
parent
59cff705e7
commit
04d74c5090
@ -778,6 +778,12 @@ static int boot_config_find(const BootConfig *config, const char *id) {
|
||||
if (!id)
|
||||
return -1;
|
||||
|
||||
if (id[0] == '@') {
|
||||
if (!strcaseeq(id, "@saved"))
|
||||
return -1;
|
||||
id = config->entry_selected;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < config->n_entries; i++)
|
||||
if (fnmatch(id, config->entries[i].id, FNM_CASEFOLD) == 0)
|
||||
return i;
|
||||
|
Loading…
Reference in New Issue
Block a user