summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiExtractGuidedSectionLib
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/PeiExtractGuidedSectionLib')
-rw-r--r--MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c12
-rw-r--r--MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf2
2 files changed, 8 insertions, 6 deletions
diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
index 6b2797778c..d5c20c5a96 100644
--- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
+++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c
@@ -1,7 +1,7 @@
/** @file
Provide generic extract guided section functions for PEI phase.
- Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -67,7 +67,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
PcdGet32 (PcdMaximumGuidedExtractHandler) *
- sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)
+ sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
);
}
//
@@ -94,6 +94,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
//
// No enough resource to build guid hob.
//
+ *InfoPointer = NULL;
return EFI_OUT_OF_RESOURCES;
}
//
@@ -109,7 +110,7 @@ PeiGetExtractGuidedSectionHandlerInfo (
HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
(UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
PcdGet32 (PcdMaximumGuidedExtractHandler) *
- sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)
+ sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
);
//
// return the created HandlerInfo.
@@ -148,7 +149,8 @@ ExtractGuidedSectionGetGuidList (
//
Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);
if (EFI_ERROR (Status)) {
- return Status;
+ *ExtractHandlerGuidTable = NULL;
+ return 0;
}
//
@@ -238,7 +240,7 @@ ExtractGuidedSectionRegisterHandlers (
CopyGuid (HandlerInfo->ExtractHandlerGuidTable + HandlerInfo->NumberOfExtractHandler, SectionGuid);
HandlerInfo->ExtractDecodeHandlerTable [HandlerInfo->NumberOfExtractHandler] = DecodeHandler;
HandlerInfo->ExtractGetInfoHandlerTable [HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler;
-
+
return RETURN_SUCCESS;
}
diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
index ff1bf2f7c6..639c058948 100644
--- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
+++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
@@ -21,7 +21,7 @@
FILE_GUID = 41ddf016-2a11-415f-8880-00d938e9541a
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
- LIBRARY_CLASS = ExtractGuidedSectionLib|PEIM PEI_CORE SEC
+ LIBRARY_CLASS = ExtractGuidedSectionLib|PEIM PEI_CORE
#
# The following information is for reference only and not required by the build tools.