]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg: Add back FfsFindSectionData
authorMin M Xu <min.m.xu@intel.com>
Thu, 19 Jan 2023 01:51:08 +0000 (09:51 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 19 Jan 2023 08:35:59 +0000 (08:35 +0000)
In commit c673216f53 a new input parameter is added in FfsFindSectionData.
That change breaks the build of ArmVirtPkg. In this patch
FfsFindSectionData is added back. It calls FfsFindSectionDataWithHook with
a NULL hook.

Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
EmbeddedPkg/Include/Library/PrePiLib.h
EmbeddedPkg/Library/PrePiLib/FwVol.c

index 0c259864d6121638598bc38a998b87f392d9b021..93a9115eac2d79ffa06b0dd2d67912f6dbcc81b3 100644 (file)
@@ -85,6 +85,26 @@ FfsFindSectionDataWithHook (
   OUT VOID                   **SectionData\r
   );\r
 \r
+/**\r
+  This service enables discovery sections of a given type within a valid FFS file.\r
+\r
+  @param  SectionType           The value of the section type to find.\r
+  @param  FileHandle            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
+  @retval EFI_SUCCESS           The section was found.\r
+  @retval EFI_NOT_FOUND         The section was not found.\r
+\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
+  );\r
+\r
 /**\r
   Find a file in the volume by name\r
 \r
index 85dbf5b0adb3b6b0111d68f25e8854d53d1edb4c..7739a5c8aae74912fb9cdca283ac20e9af04694a 100644 (file)
@@ -504,6 +504,29 @@ FfsFindSectionDataWithHook (
            );\r
 }\r
 \r
+/**\r
+  This service enables discovery sections of a given type within a valid FFS file.\r
+\r
+  @param  SectionType           The value of the section type to find.\r
+  @param  FileHandle            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
+  @retval EFI_SUCCESS           The section was found.\r
+  @retval EFI_NOT_FOUND         The section was not found.\r
+\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
+  )\r
+{\r
+  return FfsFindSectionDataWithHook (SectionType, NULL, FileHandle, SectionData);\r
+}\r
+\r
 /**\r
   This service enables discovery of additional firmware files.\r
 \r