ACK: [PATCH 3/3] uefidump: add dumping for the URI device path
Alex Hung
alex.hung at canonical.com
Mon Nov 9 07:41:13 UTC 2015
On 11/05/2015 04:55 PM, Ivan Hu wrote:
> Add dumping with uefi spec. 2.5 for new messaging device path, URI device path.
>
> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
> ---
> src/uefi/uefidump/uefidump.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/src/uefi/uefidump/uefidump.c b/src/uefi/uefidump/uefidump.c
> index 83660a2..654bc54 100644
> --- a/src/uefi/uefidump/uefidump.c
> +++ b/src/uefi/uefidump/uefidump.c
> @@ -484,6 +484,20 @@ static char *uefidump_build_dev_path(char *path, fwts_uefi_dev_path *dev_path, c
> n->namesp_id, n->ext_unique_id);
> }
> break;
> + case FWTS_UEFI_URI_DEVICE_PATH_SUBTYPE:
> + if (dev_path_len >= sizeof(fwts_uefi_uri_dev_path)) {
> + fwts_uefi_uri_dev_path *u = (fwts_uefi_uri_dev_path *)dev_path;
> + char *tmp;
> + uint16_t len = u->dev_path.length[0] | (((uint16_t)u->dev_path.length[1]) << 8);
> + tmp = malloc(len - sizeof(fwts_uefi_uri_dev_path) + 1);
> + if (tmp) {
> + memcpy(tmp, u->uri, len - sizeof(fwts_uefi_uri_dev_path));
> + tmp[len - sizeof(fwts_uefi_uri_dev_path)] = '\0';
> + path = uefidump_vprintf(path, "\\URI(%s)", tmp);
> + free(tmp);
> + }
> + }
> + break;
> default:
> path = uefidump_vprintf(path, "\\Unknown-MESSAGING-DEV-PATH(0x%" PRIx8 ")", dev_path->subtype);
> break;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list