diff options
| author | Peter Jones <pjones@redhat.com> | 2021-03-11 17:19:37 -0500 |
|---|---|---|
| committer | Javier Martinez Canillas <javier@dowhile0.org> | 2021-03-12 10:15:01 +0100 |
| commit | b3b518509230b94c901913e8ab5602e4a9ae4c10 (patch) | |
| tree | 281a9e03f874afd546295e56703528e593ee4d97 | |
| parent | 76f35c00ef9df3958c5479d74f8d6605c32901ec (diff) | |
| download | efi-boot-shim-b3b518509230b94c901913e8ab5602e4a9ae4c10.tar.gz efi-boot-shim-b3b518509230b94c901913e8ab5602e4a9ae4c10.zip | |
set_sbat_uefi_variable(): add a pile of debug prints.
This makes it so we can tell what it's actually doing and why.
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | sbat.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -327,12 +327,17 @@ set_sbat_uefi_variable(void) sbatsize >= strlen(SBAT_VAR_SIG "1") && strncmp((const char *)sbat, SBAT_VAR_SIG, strlen(SBAT_VAR_SIG))) { + dprint("SBAT variable is %d bytes, attributes are 0x%08x\n", + sbatsize, attributes); FreePool(sbat); return EFI_SUCCESS; } else { FreePool(sbat); /* delete previous variable */ + dprint("%s variable is %d bytes, attributes are 0x%08x\n", + SBAT_VAR_NAME, sbatsize, attributes); + dprint("Deleting %s variable.\n", SBAT_VAR_NAME); efi_status = set_variable(SBAT_VAR_NAME, SHIM_LOCK_GUID, attributes, 0, ""); if (EFI_ERROR(efi_status)) { @@ -359,6 +364,8 @@ set_sbat_uefi_variable(void) if (sbatsize != strlen(SBAT_VAR) || strncmp((const char *)sbat, SBAT_VAR, strlen(SBAT_VAR)) != 0) { + dprint("new sbatsize is %d, expected %d\n", sbatsize, + strlen(SBAT_VAR)); efi_status = EFI_INVALID_PARAMETER; } else { dprint(L"SBAT variable initialization succeeded\n"); |
