ACK: [PATCH 1/4] uefidump: dump the optional data for load option on boot device

Alex Hung alex.hung at canonical.com
Wed Apr 20 05:26:16 UTC 2016


On 2016-04-20 11:20 AM, Ivan Hu wrote:
> 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);
> +	}
>   }
>
>   /*
>


Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list