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