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