summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c')
-rw-r--r--MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c44
1 files changed, 24 insertions, 20 deletions
diff --git a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
index 8cf4641555..c4957de6e3 100644
--- a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
+++ b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c
@@ -100,22 +100,22 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
EFI_STATUS
EFIAPI
CustomGuidedSectionExtract (
- IN CONST EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
- IN CONST VOID *InputSection,
- OUT VOID **OutputBuffer,
- OUT UINTN *OutputSize,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
+ IN CONST VOID *InputSection,
+ OUT VOID **OutputBuffer,
+ OUT UINTN *OutputSize,
+ OUT UINT32 *AuthenticationStatus
);
//
// Module global for the Section Extraction Protocol handle
//
-EFI_HANDLE mSectionExtractionHandle = NULL;
+EFI_HANDLE mSectionExtractionHandle = NULL;
//
// Module global for the Section Extraction Protocol instance
//
-EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL mCustomGuidedSectionExtractionProtocol = {
+EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL mCustomGuidedSectionExtractionProtocol = {
CustomGuidedSectionExtract
};
@@ -205,19 +205,19 @@ EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL mCustomGuidedSectionExtractionProtocol =
EFI_STATUS
EFIAPI
CustomGuidedSectionExtract (
- IN CONST EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
- IN CONST VOID *InputSection,
- OUT VOID **OutputBuffer,
- OUT UINTN *OutputSize,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL *This,
+ IN CONST VOID *InputSection,
+ OUT VOID **OutputBuffer,
+ OUT UINTN *OutputSize,
+ OUT UINT32 *AuthenticationStatus
)
{
- EFI_STATUS Status;
- VOID *ScratchBuffer;
- VOID *AllocatedOutputBuffer;
- UINT32 OutputBufferSize;
- UINT32 ScratchBufferSize;
- UINT16 SectionAttribute;
+ EFI_STATUS Status;
+ VOID *ScratchBuffer;
+ VOID *AllocatedOutputBuffer;
+ UINT32 OutputBufferSize;
+ UINT32 ScratchBufferSize;
+ UINT16 SectionAttribute;
//
// Init local variable
@@ -259,6 +259,7 @@ CustomGuidedSectionExtract (
FreePool (ScratchBuffer);
return EFI_OUT_OF_RESOURCES;
}
+
*OutputBuffer = AllocatedOutputBuffer;
}
@@ -278,9 +279,11 @@ CustomGuidedSectionExtract (
if (AllocatedOutputBuffer != NULL) {
FreePool (AllocatedOutputBuffer);
}
+
if (ScratchBuffer != NULL) {
FreePool (ScratchBuffer);
}
+
DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status));
return Status;
}
@@ -297,7 +300,7 @@ CustomGuidedSectionExtract (
//
// Set real size of output buffer.
//
- *OutputSize = (UINTN) OutputBufferSize;
+ *OutputSize = (UINTN)OutputBufferSize;
//
// Free unused scratch buffer.
@@ -344,7 +347,8 @@ SectionExtractionDxeEntry (
while (ExtractHandlerNumber-- > 0) {
Status = gBS->InstallMultipleProtocolInterfaces (
&mSectionExtractionHandle,
- &ExtractHandlerGuidTable [ExtractHandlerNumber], &mCustomGuidedSectionExtractionProtocol,
+ &ExtractHandlerGuidTable[ExtractHandlerNumber],
+ &mCustomGuidedSectionExtractionProtocol,
NULL
);
ASSERT_EFI_ERROR (Status);