Skip to content

Commit

Permalink
Silence minor nit in load-options parsing debug output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vathpela committed Feb 19, 2025
1 parent d42eccc commit 561c613
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions load-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 561c613

Please sign in to comment.