summaryrefslogtreecommitdiffstats
path: root/src/shared/bootspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/bootspec.c')
-rw-r--r--src/shared/bootspec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c
index 188ab1d663..fd08e22bf9 100644
--- a/src/shared/bootspec.c
+++ b/src/shared/bootspec.c
@@ -986,3 +986,15 @@ int boot_entries_augment_from_loader(
return 0;
}
+
+BootEntry* boot_config_find_entry(BootConfig *config, const char *id) {
+ assert(config);
+ assert(id);
+
+ for (size_t j = 0; j < config->n_entries; j++)
+ if (streq_ptr(config->entries[j].id, id) ||
+ streq_ptr(config->entries[j].id_old, id))
+ return config->entries + j;
+
+ return NULL;
+}