7bea883
From 520e902d864930e2d4f329983d9ae9781a24231f 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
---
cc1db7f
 security/integrity/platform_certs/load_uefi.c | 6 ++++--
8eb3db7
 1 file changed, 4 insertions(+), 2 deletions(-)
8eb3db7
cc1db7f
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
7bea883
index 9ef34c44fd1..13a2826715d 100644
cc1db7f
--- a/security/integrity/platform_certs/load_uefi.c
cc1db7f
+++ b/security/integrity/platform_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
-- 
7bea883
2.15.0
8eb3db7