[U-Boot] [PATCH v2 08/16] efi_loader: debug output installed device path
Heinrich Schuchardt
xypron.glpk at gmx.de
Fri Dec 22 18:09:17 UTC 2017
When a device path protocol is installed write the device
path to the console in debug mode.
For printing the new macro EFI_PRINT is used, which can be reused
for future diagnostic output.
Remove unused EFI_PRINT_GUID macro
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
v2
Remove unused EFI_PRINT_GUID macro.
Use new macro EFI_PRINT to output device path.
---
include/efi_loader.h | 7 ++++---
lib/efi_loader/efi_boottime.c | 5 +++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 637e6e166d..4198329230 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -69,10 +69,11 @@ const char *__efi_nesting_dec(void);
} while(0)
/*
- * Write GUID
+ * Write an indented message with EFI prefix
*/
-#define EFI_PRINT_GUID(txt, guid) ({ \
- debug("%sEFI: %s %pUl\n", __efi_nesting(), txt, guid); \
+#define EFI_PRINT(format, ...) ({ \
+ debug("%sEFI: " format, __efi_nesting(), \
+ ##__VA_ARGS__); \
})
extern struct efi_runtime_services efi_runtime_services;
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 44c9da0a7c..2da0526efb 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -876,6 +876,11 @@ efi_status_t efi_add_protocol(const void *handle, const efi_guid_t *protocol,
handler->protocol_interface = protocol_interface;
INIT_LIST_HEAD(&handler->open_infos);
list_add_tail(&handler->link, &efiobj->protocols);
+ if (!guidcmp(&efi_guid_device_path, protocol)) {
+ EFI_PRINT("installed device path '%ls'\n",
+ efi_dp_str((struct efi_device_path *)
+ protocol_interface));
+ }
return EFI_SUCCESS;
}
--
2.15.1
More information about the U-Boot
mailing list