
On 4/9/19 4:37 AM, AKASHI Takahiro wrote:
On Sat, Apr 06, 2019 at 04:42:56PM +0200, Heinrich Schuchardt wrote:
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().
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
-Takahiro Akashi
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
lib/efi_loader/efi_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index 0483403be0d..39e37749fe2 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -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) {
ret = EFI_SUCCESS;EFI_PRINT("file handle %p\n", *new_handle);
- else
- } else { ret = EFI_NOT_FOUND;
- }
out: return EFI_EXIT(ret); } -- 2.20.1