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