From a674edede0b3322b7e1d4f38dc03ec5bce9d81f5 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 1 Jun 2022 11:01:24 -0400 Subject: sbat: add the parsed SBAT variable entries to the debug log Signed-off-by: Peter Jones --- sbat.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sbat.c b/sbat.c index 9b872082..f1d6e98d 100644 --- a/sbat.c +++ b/sbat.c @@ -289,6 +289,7 @@ parse_sbat_var(list_t *entries) UINT8 *data = 0; UINTN datasize; EFI_STATUS efi_status; + list_t *pos = NULL; if (!entries) { dprint(L"entries is NULL\n"); @@ -305,7 +306,20 @@ parse_sbat_var(list_t *entries) * We've intentionally made sure there's a NUL byte on all variable * allocations, so use that here. */ - return parse_sbat_var_data(entries, data, datasize+1); + efi_status = parse_sbat_var_data(entries, data, datasize+1); + if (EFI_ERROR(efi_status)) + return efi_status; + + dprint(L"SBAT variable entries:\n"); + list_for_each(pos, entries) { + struct sbat_var_entry *entry; + + entry = list_entry(pos, struct sbat_var_entry, list); + dprint(L"%a, %a, %a\n", entry->component_name, + entry->component_generation, entry->sbat_datestamp); + } + + return efi_status; } static bool -- cgit v1.2.3