efi_selftest: export efi_st_get_config_table()
We can use efi_st_get_config_table() in multiple unit tests.
Export the function.
Export system-table and boot-services.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
diff --git a/lib/efi_selftest/efi_selftest_util.c b/lib/efi_selftest/efi_selftest_util.c
index dba02d6..7e03e0c 100644
--- a/lib/efi_selftest/efi_selftest_util.c
+++ b/lib/efi_selftest/efi_selftest_util.c
@@ -110,3 +110,14 @@
}
return 0;
}
+
+void *efi_st_get_config_table(const efi_guid_t *guid)
+{
+ size_t i;
+
+ for (i = 0; i < st_systable->nr_tables; i++) {
+ if (!guidcmp(guid, &st_systable->tables[i].guid))
+ return st_systable->tables[i].table;
+ }
+ return NULL;
+}