summaryrefslogtreecommitdiffstats
path: root/0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2020-04-26 21:15:20 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2020-04-26 21:15:20 -0500
commit6c2cc50051831fa502a8b082a312ca90e7039f3f (patch)
treebb474cc356d09fb7963eadaeb127a00f7fed6531 /0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch
parentd1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236 (diff)
downloadkernel-6c2cc50051831fa502a8b082a312ca90e7039f3f.tar.gz
kernel-6c2cc50051831fa502a8b082a312ca90e7039f3f.tar.xz
kernel-6c2cc50051831fa502a8b082a312ca90e7039f3f.zip
kernel-5.7.0-0.rc3.1
* Sun Apr 26 2020 CKI@GitLab <cki-project@redhat.com> [5.7.0-0.rc3.1] - v5.7-rc3 rebase - Add cec to the filter overrides ("Justin M. Forbes") - Add overrides to filter-modules.sh ("Justin M. Forbes") - Adjust the changelog update script to not push anything (Jeremy Cline) - Drop --target noarch from the rh-rpms make target (Jeremy Cline) 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.patch20
1 files changed, 10 insertions, 10 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 68484962d..db6d4322c 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
@@ -1,4 +1,4 @@
-From 8be0f0be016b13c04d62f527bdd029a733e3aa39 Mon Sep 17 00:00:00 2001
+From 179103797c3ca18c1b89f0a0fc0bba40eff759c2 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 2 Oct 2017 18:22:13 -0400
Subject: [PATCH] Add efi_status_to_str() and rework efi_status_to_err().
@@ -23,13 +23,13 @@ index 911a2bd0f6b7..3696e87f19ee 100644
#include <linux/memblock.h>
#include <linux/security.h>
+#include <linux/bsearch.h>
-
+
#include <asm/early_ioremap.h>
-
+
@@ -831,40 +832,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 911a2bd0f6b7..3696e87f19ee 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 911a2bd0f6b7..3696e87f19ee 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 251f1f783cdf..fa8e23680314 100644
@@ -166,7 +166,7 @@ index 251f1f783cdf..fa8e23680314 100644
@@ -42,6 +42,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 251f1f783cdf..fa8e23680314 100644
typedef u16 efi_char16_t; /* UNICODE character */
@@ -825,6 +827,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.26.0
+2.26.2