mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
boot: Correctly handle @saved default patterns
(cherry picked from commit 7941f11acb67c4f8ec857a791a51f3148af67b32) (cherry picked from commit 6189505d7936bc495801f2322321844fdea619c1)
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…
x
Reference in New Issue
Block a user