efi_loader: debug output file handle in efi_file_open()
PATCH 1/1 efi_loader: debug output file handle in efi_file_open()
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().
--- lib/efi_loader/efi_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
lib/efi_loader/efi_file.c +4 -2
@@ -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); }
--
2.20.1
PATCH 1/1 efi_loader: debug output file handle in efi_file_open()
Quoted 3 lines · Heinrich Schuchardt
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 withEFI_PRINT().
Just a question.
How will you use the address for debugging?
-Takahiro Akashi
Quoted 27 lines
Signed-off-by Heinrich Schuchardt <[email protected]>--- lib/efi_loader/efi_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)lib/efi_loader/efi_file.c +4
-3@@ -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); } --2.20.1
PATCH 1/1 efi_loader: debug output file handle in efi_file_open()
Quoted 7 lines · AKASHI Takahiro
Quoted 3 lines · Heinrich Schuchardt
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 withEFI_PRINT().Just a question.
How will you use the address for debugging?
The handle address is shown by EFI_ENTRY in SetInfo(), GetInfo(), Read(), ...
This helped me to understand for which file GetInfo() was failing in the EFI Shell.
Best regards
Heinrich
Quoted 31 lines
-Takahiro Akashi
Quoted 27 lines
Signed-off-by Heinrich Schuchardt <[email protected]>--- lib/efi_loader/efi_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)lib/efi_loader/efi_file.c +4
-3@@ -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); } --2.20.1