[PATCH] uefidump: add Relative Offset Range subtype support for Media device path (LP: #1322465)

Keng-Yu Lin keng-yu.lin at canonical.com
Thu Jul 24 06:55:05 UTC 2014


On Fri, May 23, 2014 at 4:39 PM, Ivan Hu <ivan.hu at canonical.com> wrote:
> Add the subtype support.
> Sub-Type 8 – Relative Offset Range.
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
>  src/uefi/uefidump/uefidump.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 61e8b7c..efb2c53 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -573,6 +573,14 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c
>                                         p->fw_volume_name.info4[6], p->fw_volume_name.info4[7]);
>                         }
>                         break;
> +               case FWTS_UEFI_RELATIVE_OFFSET_RANGE_SUBTYPE:
> +                       if (dev_path_len >= sizeof(fwts_relative_offset_range_path)) {
> +                               fwts_relative_offset_range_path *r = (fwts_relative_offset_range_path *)dev_path;
> +                               path = uefidump_vprintf(path, "\\RELATIVEOFFSETRANGE("
> +                                       "0x%" PRIx64 ",0x%" PRIx64 ")",
> +                                       r->starting_offset, r->ending_offset);
> +                       }
> +                       break;
>                 default:
>                         path = uefidump_vprintf(path, "\\Unknown-MEDIA-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
>                         break;
> --
> 1.7.9.5
>

the patch can compile with current head in the git tree, so,

Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list