]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: log EFI return values too
authorRob Clark <robdclark@gmail.com>
Mon, 24 Jul 2017 14:31:52 +0000 (10:31 -0400)
committerAlexander Graf <agraf@suse.de>
Tue, 25 Jul 2017 08:29:46 +0000 (10:29 +0200)
Turns out this is rather useful to tracking down where things fail.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_loader.h

index 4bcd35ac77207b2cff25fbeb616a2a461d40cd54..40f6c89e656ab76d1d464f5a21ca99afbf4f3826 100644 (file)
        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;