diff options
| author | Peter Jones <pjones@redhat.com> | 2025-02-19 13:35:00 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2025-02-24 15:22:28 -0500 |
| commit | e3f0338b53e2926f910aebc420ae2faa13e8b0fd (patch) | |
| tree | 0caf84075a3a16b2c656b94ab4ffec8ba934adae /load-options.c | |
| parent | d972515e608e4898c4a34a5895648135d4ac5aec (diff) | |
| download | efi-boot-shim-e3f0338b53e2926f910aebc420ae2faa13e8b0fd.tar.gz efi-boot-shim-e3f0338b53e2926f910aebc420ae2faa13e8b0fd.zip | |
Silence minor nit in load-options parsing debug output
Previously when there were no load options, this would go in the debug
log:
load-options.c:313:parse_load_options() full load options:
include/hexdump.h:92:vhexdumpf() hexdump of a NULL pointer!
This changes it to say:
load-options.c:315:parse_load_options() LoadOptions is empty
Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'load-options.c')
| -rw-r--r-- | load-options.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/load-options.c b/load-options.c index 091cb18b..660eaa91 100644 --- a/load-options.c +++ b/load-options.c @@ -311,8 +311,13 @@ parse_load_options(EFI_LOADED_IMAGE *li) UINT32 remaining_size; CHAR16 *loader_str = NULL; - dprint(L"full load options:\n"); - dhexdumpat(li->LoadOptions, li->LoadOptionsSize, 0); + if (!li->LoadOptions || !li->LoadOptionsSize) { + dprint(L"LoadOptions is empty\n"); + return EFI_SUCCESS; + } else { + dprint(L"full LoadOptions:\n"); + dhexdumpat(li->LoadOptions, li->LoadOptionsSize, 0); + } /* * Sanity check since we make several assumptions about the length |
