/* This service enables discovery sections of a given type within a valid FFS file. Caller also can provide a SectionCheckHook to do additional checking. */
EFI_STATUS EFIAPI FfsFindSectionDataWithHook(IN EFI_SECTION_TYPE SectionType, IN FFS_CHECK_SECTION_HOOK SectionCheckHook, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
/* This service enables discovery sections of a given type within a valid FFS file. Caller also can provide a SectionCheckHook to do additional checking. */
EFI_STATUS EFIAPI FfsFindSectionDataWithHook(IN EFI_SECTION_TYPE SectionType, IN FFS_CHECK_SECTION_HOOK SectionCheckHook, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData)
{
  EFI_FFS_FILE_HEADER        *FfsFileHeader;
  UINT32                     FileSize;
  EFI_COMMON_SECTION_HEADER  *Section;
  FfsFileHeader = (EFI_FFS_FILE_HEADER *)(FileHandle);
  Section   = (EFI_COMMON_SECTION_HEADER *)(FfsFileHeader + 1);
  FileSize  = *(UINT32 *)(FfsFileHeader->Size) & 0x00FFFFFF;
  FileSize -= sizeof (EFI_FFS_FILE_HEADER);
  return FfsProcessSection (
           SectionType,
           SectionCheckHook,
           Section,
           FileSize,
           SectionData
           );
}