ACK: [PATCH 2/4] uefidump: dump the optional data for load option on driver device
Colin Ian King
colin.king at canonical.com
Wed Apr 20 09:07:14 UTC 2016
On 20/04/16 06:26, Alex Hung wrote:
> On 2016-04-20 11:20 AM, Ivan Hu wrote:
>> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
>> ---
>> src/uefi/uefidump/uefidump.c | 11 ++++++++++-
>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
>> index 8f88c74..43f70cf 100644
>> --- a/src/uefi/uefidump/uefidump.c
>> +++ b/src/uefi/uefidump/uefidump.c
>> @@ -1089,6 +1089,7 @@ static void
>> uefidump_info_driverdev(fwts_framework *fw, fwts_uefi_var *var)
>> {
>> fwts_uefi_load_option *load_option;
>> size_t len;
>> + size_t offset;
>>
>> if (var->datalen < sizeof(fwts_uefi_load_option))
>> return;
>> @@ -1109,7 +1110,6 @@ static void
>> uefidump_info_driverdev(fwts_framework *fw, fwts_uefi_var *var)
>>
>> if (load_option->file_path_list_length != 0) {
>> char *path;
>> - size_t offset;
>>
>> /* Skip over description to get to packed path, unpack path
>> and print */
>> offset = sizeof(load_option->attributes) +
>> @@ -1120,6 +1120,15 @@ static void
>> uefidump_info_driverdev(fwts_framework *fw, fwts_uefi_var *var)
>> 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);
>> + }
>> }
>>
>> static void uefidump_info_keyoption(fwts_framework *fw,
>> fwts_uefi_var *var)
>>
>
> Acked-by: Alex Hung <alex.hung at canonical.com>
>
Acked-by: Colin Ian King <colin.king at canonical.com>
More information about the fwts-devel
mailing list