All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] efi_loader: correct text conversion for vendor DP
@ 2019-09-04 11:13 Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2019-09-04 11:13 UTC (permalink / raw)
  To: u-boot

Vendor device paths may contain data. When converting vendor device paths
to text this binary data has to be rendered.

UEFI SCT, 2017, 5.4.7.1.3

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 lib/efi_loader/efi_device_path_to_text.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index 96fd08971b..133542ad40 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -60,9 +60,18 @@ static char *dp_hardware(char *s, struct efi_device_path *dp)
 		break;
 	}
 	case DEVICE_PATH_SUB_TYPE_VENDOR: {
+		int i, n;
 		struct efi_device_path_vendor *vdp =
 			(struct efi_device_path_vendor *)dp;
-		s += sprintf(s, "VenHw(%pUl)", &vdp->guid);
+
+		s += sprintf(s, "VenHw(%pUl", &vdp->guid);
+		n = (int)vdp->dp.length - sizeof(struct efi_device_path_vendor);
+		if (n > 0) {
+			s += sprintf(s, ",");
+			for (i = 0; i < n; ++i)
+				s += sprintf(s, "%02x", vdp->vendor_data[i]);
+		}
+		s += sprintf(s, ")");
 		break;
 	}
 	default:
--
2.23.0.rc1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-04 11:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 11:13 [U-Boot] [PATCH 1/1] efi_loader: correct text conversion for vendor DP Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.