diff options
Diffstat (limited to 'include/efi/efi-util.h')
-rw-r--r-- | include/efi/efi-util.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/efi/efi-util.h b/include/efi/efi-util.h new file mode 100644 index 0000000000..c61f3a5b05 --- /dev/null +++ b/include/efi/efi-util.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __EFI_UTIL_H +#define __EFI_UTIL_H + +#include <efi/types.h> + +const char *efi_strerror(efi_status_t err); +int efi_errno(efi_status_t err); + +int __efivarfs_parse_filename(const char *filename, efi_guid_t *vendor, + s16 *name, size_t *namelen); +int efivarfs_parse_filename(const char *filename, efi_guid_t *vendor, s16 **name); + +static inline int +efi_guidcmp (efi_guid_t left, efi_guid_t right) +{ + return memcmp(&left, &right, sizeof (efi_guid_t)); +} + +#endif |