Skip to content

Commit a674ede

Browse files
committed
sbat: add the parsed SBAT variable entries to the debug log
Signed-off-by: Peter Jones <pjones@redhat.com>
1 parent 8ee1e1c commit a674ede

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

sbat.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ parse_sbat_var(list_t *entries)
289289
UINT8 *data = 0;
290290
UINTN datasize;
291291
EFI_STATUS efi_status;
292+
list_t *pos = NULL;
292293

293294
if (!entries) {
294295
dprint(L"entries is NULL\n");
@@ -305,7 +306,20 @@ parse_sbat_var(list_t *entries)
305306
* We've intentionally made sure there's a NUL byte on all variable
306307
* allocations, so use that here.
307308
*/
308-
return parse_sbat_var_data(entries, data, datasize+1);
309+
efi_status = parse_sbat_var_data(entries, data, datasize+1);
310+
if (EFI_ERROR(efi_status))
311+
return efi_status;
312+
313+
dprint(L"SBAT variable entries:\n");
314+
list_for_each(pos, entries) {
315+
struct sbat_var_entry *entry;
316+
317+
entry = list_entry(pos, struct sbat_var_entry, list);
318+
dprint(L"%a, %a, %a\n", entry->component_name,
319+
entry->component_generation, entry->sbat_datestamp);
320+
}
321+
322+
return efi_status;
309323
}
310324

311325
static bool

0 commit comments

Comments
 (0)