]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Correctly handle @saved default patterns 24555/head
authorJan Janssen <medhefgo@web.de>
Sat, 3 Sep 2022 22:22:23 +0000 (00:22 +0200)
committerJan Janssen <medhefgo@web.de>
Wed, 12 Oct 2022 13:13:14 +0000 (15:13 +0200)
src/shared/bootspec.c

index b88d42fdc183515fe9f5381d6c81fa47d814c849..40dc88f8dcce57bfa3e96e27b415c4d1a73fc114 100644 (file)
@@ -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;