Skip to contentSkip to conversation

efi_loader: log EFI return values too

PATCH Applied Rob Clark 2 participants 2 messages Jul 24, 2017 – Jul 28, 2017

lore
Share & tools
lore

Rob Clark

author
#0 lore raw

PATCH 1/1 efi_loader: log EFI return values too

Turns out this is rather useful to tracking down where things fail.

---
v2: use EFI_ERROR_MASK

 include/efi_loader.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/efi_loader.h +4 -1
index 40e0f1dbd7..a8df44fdb6 100644
@@ -20,7 +20,10 @@
 	debug("EFI: Entry %s(" format ")\n", __func__, ##__VA_ARGS__); \
 	} while(0)
 
-#define EFI_EXIT(ret) efi_exit_func(ret);
+#define EFI_EXIT(ret) ({ \
+	debug("EFI: Exit: %s: %u\n", __func__, (u32)((ret) & ~EFI_ERROR_MASK)); \
+	efi_exit_func(ret); \
+	})
 
 extern struct efi_runtime_services efi_runtime_services;
 extern struct efi_system_table systab;
Signature · 1 line
2.13.0