projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7851732
)
boot: Correctly handle @saved default patterns
author
Jan Janssen
<medhefgo@web.de>
Sat, 3 Sep 2022 22:22:23 +0000
(
00:22
+0200)
committer
Jan Janssen
<medhefgo@web.de>
Wed, 12 Oct 2022 13:13:14 +0000
(15:13 +0200)
src/shared/bootspec.c
patch
|
blob
|
history
diff --git
a/src/shared/bootspec.c
b/src/shared/bootspec.c
index b88d42fdc183515fe9f5381d6c81fa47d814c849..40dc88f8dcce57bfa3e96e27b415c4d1a73fc114 100644
(file)
--- 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;