orgads / rpms / kernel

Forked from rpms/kernel 4 years ago
Clone
e336be
From 520e902d864930e2d4f329983d9ae9781a24231f Mon Sep 17 00:00:00 2001
e336be
From: Peter Jones <pjones@redhat.com>
e336be
Date: Mon, 2 Oct 2017 18:18:30 -0400
e336be
Subject: [PATCH 3/3] Make get_cert_list() use efi_status_to_str() to print
e336be
 error messages.
e336be
e336be
Signed-off-by: Peter Jones <pjones@redhat.com>
e336be
---
e336be
 certs/load_uefi.c | 6 ++++--
e336be
 1 file changed, 4 insertions(+), 2 deletions(-)
e336be
e336be
diff --git a/certs/load_uefi.c b/certs/load_uefi.c
e336be
index 9ef34c44fd1..13a2826715d 100644
e336be
--- a/certs/load_uefi.c
e336be
+++ b/certs/load_uefi.c
e336be
@@ -51,7 +51,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
e336be
 	}
e336be
 
e336be
 	if (status != EFI_BUFFER_TOO_SMALL) {
e336be
-		pr_err("Couldn't get size: 0x%lx\n", status);
e336be
+		pr_err("Couldn't get size: %s (0x%lx)\n",
e336be
+		       efi_status_to_str(status), status);
e336be
 		return efi_status_to_err(status);
e336be
 	}
e336be
 
e336be
@@ -64,7 +65,8 @@ static __init int get_cert_list(efi_char16_t *name, efi_guid_t *guid,
e336be
 	status = efi.get_variable(name, guid, NULL, &lsize, db);
e336be
 	if (status != EFI_SUCCESS) {
e336be
 		kfree(db);
e336be
-		pr_err("Error reading db var: 0x%lx\n", status);
e336be
+		pr_err("Error reading db var: %s (0x%lx)\n",
e336be
+		       efi_status_to_str(status), status);
e336be
 		return efi_status_to_err(status);
e336be
 	}
e336be
 
e336be
-- 
e336be
2.15.0
e336be