From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Clark Date: Mon, 24 Jul 2017 07:59:10 -0400 Subject: [U-Boot] [PATCH] efi_loader: log EFI return values too In-Reply-To: <20170724115911.17907-1-robdclark@gmail.com> References: <20170724115911.17907-1-robdclark@gmail.com> Message-ID: <20170724115911.17907-2-robdclark@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Turns out this is rather useful to tracking down where things fail. Signed-off-by: Rob Clark --- I've been carrying this around locally for a while.. but I find it useful and I expect others would too. include/efi_loader.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/efi_loader.h b/include/efi_loader.h index 043b29edd3..98d69a6dab 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -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) & 0xffff)); \ + efi_exit_func(ret); \ + }) extern struct efi_runtime_services efi_runtime_services; extern struct efi_system_table systab; -- 2.13.0