[PATCH 1/4] uefidump: dump the optional data for load option on boot device
Ivan Hu
ivan.hu at canonical.com
Wed Apr 20 03:20:04 UTC 2016
OptionalData are a binary data buffer that is passed to the loaded image.
Should be dumped as well for user to check.
Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
src/uefi/uefidump/uefidump.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
index d7eea4a..8f88c74 100644
--- a/src/uefi/uefidump/uefidump.c
+++ b/src/uefi/uefidump/uefidump.c
@@ -829,6 +829,15 @@ static void uefidump_info_bootdev(fwts_framework *fw, fwts_uefi_var *var)
(fwts_uefi_dev_path *)(var->data + offset), var->datalen - offset);
fwts_log_info_verbatum(fw, " Path: %s.", path);
free(path);
+
+ offset = sizeof(load_option->attributes) +
+ sizeof(load_option->file_path_list_length) +
+ (sizeof(uint16_t) * (len + 1)) +
+ load_option->file_path_list_length;
+ if ((var->datalen - offset) > 0) {
+ fwts_log_info_verbatum(fw, " OptionalData:");
+ uefidump_data_hexdump(fw, var->data + offset, var->datalen - offset);
+ }
}
/*
--
1.9.1
More information about the fwts-devel
mailing list