summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-11-22 09:47:14 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2021-11-25 08:43:59 +0100
commit7042af0a9828c61ee813cb29f548c2a471fd2108 (patch)
tree6567ef3c62b1b290db191395cccce6d5217f4e10 /include
parentba42121dae2eeed8aaf7003910add61d9f0af299 (diff)
downloadbarebox-7042af0a9828c61ee813cb29f548c2a471fd2108.tar.gz
barebox-7042af0a9828c61ee813cb29f548c2a471fd2108.tar.xz
efi: factor out errno translation
The errno translation will come in handy for the EFI loader support, so factor that out. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211122084732.2597109-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/efi/efi-util.h10
-rw-r--r--include/efi/efi.h5
2 files changed, 11 insertions, 4 deletions
diff --git a/include/efi/efi-util.h b/include/efi/efi-util.h
new file mode 100644
index 0000000000..0645af2707
--- /dev/null
+++ b/include/efi/efi-util.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __EFI_UTIL_H
+#define __EFI_UTIL_H
+
+#include <efi.h>
+
+const char *efi_strerror(efi_status_t err);
+int efi_errno(efi_status_t err);
+
+#endif
diff --git a/include/efi/efi.h b/include/efi/efi.h
index c7679b4b8f..e77b1c5feb 100644
--- a/include/efi/efi.h
+++ b/include/efi/efi.h
@@ -3,16 +3,13 @@
#define __MACH_EFI_H
#include <efi.h>
-
-const char *efi_strerror(efi_status_t err);
+#include <efi/efi-util.h>
extern efi_system_table_t *efi_sys_table;
extern efi_handle_t efi_parent_image;
extern struct efi_device_path *efi_device_path;
extern efi_loaded_image_t *efi_loaded_image;
-int efi_errno(efi_status_t err);
-
void *efi_get_variable(char *name, efi_guid_t *vendor, int *var_size);
static inline void *efi_get_global_var(char *name, int *var_size)