[U-Boot] [PATCH v2 2/2] efi_loader: device_path: show a host device in understandable form
AKASHI Takahiro
takahiro.akashi at linaro.org
Thu Sep 12 04:52:36 UTC 2019
It would be better to give a user-friendly text to a host device
on sandbox instead of just dumping its guid.
=> host bind 0 /opt/disk/uboot_sandbox_fat.img
=> efi devices
Device Device Path
================ ====================
0000000015c1f3a0 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)
0000000015c20f00 /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/Hostdev(0)
Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
lib/efi_loader/efi_device_path_to_text.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index 96fd08971b73..40a06b70e08a 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -62,6 +62,11 @@ static char *dp_hardware(char *s, struct efi_device_path *dp)
case DEVICE_PATH_SUB_TYPE_VENDOR: {
struct efi_device_path_vendor *vdp =
(struct efi_device_path_vendor *)dp;
+#ifdef CONFIG_SANDBOX
+ if (!guidcmp(&vdp->guid, &efi_guid_host_dev))
+ s += sprintf(s, "Hostdev(%d)", vdp->vendor_data[0]);
+ else
+#endif
s += sprintf(s, "VenHw(%pUl)", &vdp->guid);
break;
}
--
2.21.0
More information about the U-Boot
mailing list