diff options
author | Heinrich Schuchardt | 2021-09-09 08:22:58 +0200 |
---|---|---|
committer | Heinrich Schuchardt | 2021-10-25 21:13:06 +0200 |
commit | e618d1d285172232c2799bd175b51f63c846f777 (patch) | |
tree | 866b9979ae4ad4e6082054be2cdb821185027afa /include/efi_variable.h | |
parent | d47671c631c3f3f3bbf0a33f6bf8afeebfe8c091 (diff) |
efi_loader: function to get GUID for variable name
In multiple places we need the default GUID matching a variable name.
The patch provides a library function. For secure boot related variables
like 'PK', 'KEK', 'db' a lookup table is used. For all other variable
names EFI_GLOBAL_VARIABLE is returned.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'include/efi_variable.h')
-rw-r--r-- | include/efi_variable.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/efi_variable.h b/include/efi_variable.h index 8f666b23096..03a3ecb2359 100644 --- a/include/efi_variable.h +++ b/include/efi_variable.h @@ -257,6 +257,14 @@ enum efi_auth_var_type efi_auth_var_get_type(const u16 *name, const efi_guid_t *guid); /** + * efi_auth_var_get_guid() - get the predefined GUID for a variable name + * + * @name: name of UEFI variable + * Return: guid of UEFI variable + */ +const efi_guid_t *efi_auth_var_get_guid(const u16 *name); + +/** * efi_get_next_variable_name_mem() - Runtime common code across efi variable * implementations for GetNextVariable() * from the cached memory copy |