]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
efi_loader: debug output installed device path
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 11 Jan 2018 07:16:01 +0000 (08:16 +0100)
committerAlexander Graf <agraf@suse.de>
Mon, 22 Jan 2018 22:09:13 +0000 (23:09 +0100)
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@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_loader.h
lib/efi_loader/efi_boottime.c

index 637e6e166dec1fb378d46c6e382c330ab751b960..419832923044ccfacfea6604ba1e3c7168e1decb 100644 (file)
@@ -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;
index 7a6c282f818a8dff27469fd23dc1c4a9b9e29259..673c66a4aa367d17387aa6b99a85e1afcd07d133 100644 (file)
@@ -876,6 +876,8 @@ 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 '%pD'\n", protocol_interface);
        return EFI_SUCCESS;
 }