IN OUT EFI_PEI_FILE_HANDLE *FileHandle\r
);\r
\r
+/**\r
+ * This is a hook which is used to check if the section is the target one.\r
+ *\r
+ */\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *FFS_CHECK_SECTION_HOOK)(\r
+ IN EFI_COMMON_SECTION_HEADER *Section\r
+ );\r
+\r
/**\r
This service enables discovery sections of a given type within a valid FFS file.\r
+ Caller also can provide a SectionCheckHook to do additional checking.\r
\r
- @param SearchType The value of the section type to find.\r
- @param FfsFileHeader A pointer to the file header that contains the set of sections to\r
+ @param SectionType The value of the section type to find.\r
+ @param SectionCheckHook A hook which can check if the section is the target one.\r
+ @param FileHeader A pointer to the file header that contains the set of sections to\r
be searched.\r
@param SectionData A pointer to the discovered section, if successful.\r
\r
EFI_STATUS\r
EFIAPI\r
FfsFindSectionData (\r
- IN EFI_SECTION_TYPE SectionType,\r
- IN EFI_PEI_FILE_HANDLE FileHandle,\r
- OUT VOID **SectionData\r
+ IN EFI_SECTION_TYPE SectionType,\r
+ IN FFS_CHECK_SECTION_HOOK SectionCheckHook,\r
+ IN EFI_PEI_FILE_HANDLE FileHandle,\r
+ OUT VOID **SectionData\r
);\r
\r
/**\r