diff options
author | Justin M. Forbes <jforbes@fedoraproject.org> | 2020-06-30 09:24:22 -0500 |
---|---|---|
committer | Justin M. Forbes <jforbes@fedoraproject.org> | 2020-06-30 09:24:22 -0500 |
commit | d176dfce22f5ead7a6018edb69757bc8840cc008 (patch) | |
tree | aa15398098e0f20a9fb643441ec8443b2ffd6328 /0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch | |
parent | 61b5e2fd06a4be7134afb1cd363002e015123f7f (diff) | |
download | kernel-d176dfce22f5ead7a6018edb69757bc8840cc008.tar.gz kernel-d176dfce22f5ead7a6018edb69757bc8840cc008.tar.xz kernel-d176dfce22f5ead7a6018edb69757bc8840cc008.zip |
kernel-5.8.0-0.rc3.20200630git7c30b859a947.1
* Tue Jun 30 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.8.0-0.rc3.20200630git7c30b859a947.1]
- 7c30b859a947 rebase
- Updated changelog for the release based on v5.8-rc3 (Fedora Kernel Team)
Resolves: rhbz#
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Diffstat (limited to '0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch')
-rw-r--r-- | 0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch b/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch index 94b7dd5b5..c8e05582d 100644 --- a/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch +++ b/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch @@ -23,13 +23,13 @@ index 5114cae4ec97..93dcc37a9820 100644 #include <linux/memblock.h> #include <linux/security.h> +#include <linux/bsearch.h> - + #include <asm/early_ioremap.h> - + @@ -827,40 +828,101 @@ int efi_mem_type(unsigned long phys_addr) } #endif - + +struct efi_error_code { + efi_status_t status; + int errno; @@ -134,7 +134,7 @@ index 5114cae4ec97..93dcc37a9820 100644 - } + struct efi_error_code *found; + size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code); - + - return err; + found = bsearch((void *)(uintptr_t)status, efi_error_codes, + sizeof(struct efi_error_code), num, @@ -157,7 +157,7 @@ index 5114cae4ec97..93dcc37a9820 100644 + return "Unknown error code"; + return found->description; } - + static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock); diff --git a/include/linux/efi.h b/include/linux/efi.h index bb35f3305e55..1d77c218b67e 100644 @@ -166,7 +166,7 @@ index bb35f3305e55..1d77c218b67e 100644 @@ -43,6 +43,8 @@ #define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1))) #define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1))) - + +#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1))) + typedef unsigned long efi_status_t; @@ -174,12 +174,12 @@ index bb35f3305e55..1d77c218b67e 100644 typedef u16 efi_char16_t; /* UNICODE character */ @@ -828,6 +830,7 @@ static inline bool efi_rt_services_supported(unsigned int mask) #endif - + extern int efi_status_to_err(efi_status_t status); +extern const char *efi_status_to_str(efi_status_t status); - + /* * Variable Attributes -- -2.25.4 +2.26.2 |