UBUNTU: SAUCE: (lockdown) Make get_cert_list() use efi_status_to_str() to print error messages.

Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
(cherry picked from commit 7ba28f03674fa9346610c3fea7fc93bc58f06d2a
from https://gitlab.com/cki-project/kernel-ark)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
This commit is contained in:
Peter Jones
2017-10-02 18:18:30 -04:00
committed by Paolo Pisati
parent 1498408ec4
commit d7e68fb408
@@ -74,7 +74,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
return NULL;
if (*status != EFI_BUFFER_TOO_SMALL) {
pr_err("Couldn't get size: 0x%lx\n", *status);
pr_err("Couldn't get size: %s (0x%lx)\n",
efi_status_to_str(*status), *status);
return NULL;
}
@@ -85,7 +86,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
*status = efi.get_variable(name, guid, NULL, &lsize, db);
if (*status != EFI_SUCCESS) {
kfree(db);
pr_err("Error reading db var: 0x%lx\n", *status);
pr_err("Error reading db var: %s (0x%lx)\n",
efi_status_to_str(*status), *status);
return NULL;
}