EFI_STATUS EFIAPI fsw_efi_FileHandle_Read(IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer) { FSW_FILE_DATA *File = FSW_FILE_FROM_FILE_HANDLE(This); if (File->Type == FSW_EFI_FILE_TYPE_FILE) return fsw_efi_file_read(File, BufferSize, Buffer); else if (File->Type == FSW_EFI_FILE_TYPE_DIR) return fsw_efi_dir_read(File, BufferSize, Buffer); return EFI_UNSUPPORTED; }
EFI_STATUS EFIAPI fsw_efi_FileHandle_Read(IN EFI_FILE *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer) { EFI_STATUS Status; FSW_FILE_DATA *File; FSW_MSG_DEBUG((FSW_MSGSTR(__FUNCTION__ ": enter\n"))); Status = EFI_UNSUPPORTED; File = FSW_FILE_FROM_FILE_HANDLE(This); if (File->Type == FSW_EFI_FILE_TYPE_FILE) Status = fsw_efi_file_read(File, BufferSize, Buffer); else if (File->Type == FSW_EFI_FILE_TYPE_DIR) Status = fsw_efi_dir_read(File, BufferSize, Buffer); FSW_MSG_DEBUG((FSW_MSGSTR(__FUNCTION__ ": leaving with %r\n"), Status)); return Status; }