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