diff options
author | Jan Janssen <medhefgo@web.de> | 2022-09-04 00:22:23 +0200 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2022-10-12 15:13:14 +0200 |
commit | 7941f11acb67c4f8ec857a791a51f3148af67b32 (patch) | |
tree | 02e46fa9882e6441115ec4700b756f1fd9d323ac /src/shared/bootspec.c | |
parent | 7851732262ec94f50598c4a289589a6ddb97ebfd (diff) | |
download | systemd-7941f11acb67c4f8ec857a791a51f3148af67b32.tar.gz |
boot: Correctly handle @saved default patterns
Diffstat (limited to 'src/shared/bootspec.c')
-rw-r--r-- | src/shared/bootspec.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index b88d42fdc1..40dc88f8dc 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -994,6 +994,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; |