]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: debug output file handle in efi_file_open()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 6 Apr 2019 14:36:16 +0000 (16:36 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 7 Apr 2019 12:17:06 +0000 (14:17 +0200)
For debugging it is helpful to know the address of the file handle created
by the Open() method of the EFI file protocol. So let's write it with
EFI_PRINT().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_file.c

index 0483403be0d0fdf053b442467a5c7d5e5eeda303..be3e55f4d87bc2b6438328c631f118cbfb140bdd 100644 (file)
@@ -257,10 +257,12 @@ static efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file,
 
        /* Open file */
        *new_handle = file_open(fh->fs, fh, file_name, open_mode, attributes);
-       if (*new_handle)
+       if (*new_handle) {
+               EFI_PRINT("file handle %p\n", *new_handle);
                ret = EFI_SUCCESS;
-       else
+       } else {
                ret = EFI_NOT_FOUND;
+       }
 out:
        return EFI_EXIT(ret);
 }