diff options
author | Jan Janssen <medhefgo@web.de> | 2023-01-06 18:07:18 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2023-02-21 14:46:02 +0100 |
commit | 5080a60a719da213fa90964b76cc90bd0d1cb8de (patch) | |
tree | df289ff37bb789645f3e560e39c3e2196ad35ece /src/boot/efi/efi-string.h | |
parent | a40960748907212883f4b7de7367e6870657016e (diff) | |
download | systemd-5080a60a719da213fa90964b76cc90bd0d1cb8de.tar.gz |
boot: Provide our own EFI API headers
We want to get away from gnu-efi and the only really usable source of
EFI headers would be EDK2, which is somewhat impractical to use and
quite large to require to be around just for some headers.
As a bonus point, the new headers are safe to be included in userspace
code.
This should not have any behavior changes as it is mostly changing
header includes. There are some renames to conform to standard names
and a few minor device path fixups as the struct is defined slightly
different.
Of note is that this removes usage of uchar.h and wchar.h as they are
not guaranteed to be available in a freestanding environment. Instead
efi.h will provide the needed types.
Diffstat (limited to 'src/boot/efi/efi-string.h')
-rw-r--r-- | src/boot/efi/efi-string.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/boot/efi/efi-string.h b/src/boot/efi/efi-string.h index 2a28db3593..ea9493bcbb 100644 --- a/src/boot/efi/efi-string.h +++ b/src/boot/efi/efi-string.h @@ -1,11 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include <stdarg.h> -#include <stdbool.h> -#include <stddef.h> -#include <uchar.h> - +#include "efi.h" #include "macro-fundamental.h" size_t strnlen8(const char *s, size_t n); @@ -110,17 +106,6 @@ bool efi_fnmatch(const char16_t *pattern, const char16_t *haystack); bool parse_number8(const char *s, uint64_t *ret_u, const char **ret_tail); bool parse_number16(const char16_t *s, uint64_t *ret_u, const char16_t **ret_tail); -typedef size_t EFI_STATUS; - -#if !SD_BOOT -/* Provide these for unit testing. */ -enum { - EFI_ERROR_MASK = ((EFI_STATUS) 1 << (sizeof(EFI_STATUS) * CHAR_BIT - 1)), - EFI_SUCCESS = 0, - EFI_LOAD_ERROR = 1 | EFI_ERROR_MASK, -}; -#endif - #ifdef __clang__ # define _gnu_printf_(a, b) _printf_(a, b) #else |