[U-Boot] [PATCH v2 4/5] efi_loader: debug info in efi_convert_device_path_to_text

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Jul 13 20:51:34 UTC 2017


The debug information provided by efi_convert_device_path_to_text
is insufficient. The type and the subtype are needed to find
out why the function did not support a conversion.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
	debug statement has to be after parameter check
	to avoid NULL dereference
---
 lib/efi_loader/efi_device_path_to_text.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c
index a5ea63300b..56de328286 100644
--- a/lib/efi_loader/efi_device_path_to_text.c
+++ b/lib/efi_loader/efi_device_path_to_text.c
@@ -41,6 +41,9 @@ uint16_t *efi_convert_device_path_to_text(
 		return NULL;
 	}
 
+	debug("EFI: type %d, subtype %d\n",
+	      device_path->type, device_path->sub_type);
+
 	switch (device_path->type) {
 	case DEVICE_PATH_TYPE_MESSAGING_DEVICE:
 		switch (device_path->sub_type) {
-- 
2.11.0



More information about the U-Boot mailing list