\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
{\r
PRE_PI_EXTRACT_GUIDED_SECTION_DATA *SavedData;\r
UINT32 Index;\r
+ EFI_GUID *SectionDefinitionGuid;\r
\r
if (InputSection == NULL) {\r
return RETURN_INVALID_PARAMETER;\r
\r
SavedData = GetSavedData();\r
\r
+ if (IS_SECTION2 (InputSection)) {\r
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid);\r
+ } else {\r
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid);\r
+ }\r
+\r
//\r
// Search the match registered GetInfo handler for the input guided section.\r
//\r
for (Index = 0; Index < SavedData->NumberOfExtractHandler; Index ++) {\r
- if (CompareGuid (&SavedData->ExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ if (CompareGuid (&SavedData->ExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {\r
break;\r
}\r
}\r
ExtractGuidedSectionDecode (\r
IN CONST VOID *InputSection,\r
OUT VOID **OutputBuffer,\r
- OUT VOID *ScratchBuffer, OPTIONAL\r
+ OUT VOID *ScratchBuffer OPTIONAL,\r
OUT UINT32 *AuthenticationStatus\r
)\r
{\r
PRE_PI_EXTRACT_GUIDED_SECTION_DATA *SavedData;\r
UINT32 Index;\r
+ EFI_GUID *SectionDefinitionGuid;\r
\r
if (InputSection == NULL) {\r
return RETURN_INVALID_PARAMETER;\r
\r
SavedData = GetSavedData();\r
\r
+ if (IS_SECTION2 (InputSection)) {\r
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid);\r
+ } else {\r
+ SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid);\r
+ }\r
+\r
//\r
// Search the match registered GetInfo handler for the input guided section.\r
//\r
for (Index = 0; Index < SavedData->NumberOfExtractHandler; Index ++) {\r
- if (CompareGuid (&SavedData->ExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ if (CompareGuid (&SavedData->ExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {\r
break;\r
}\r
}\r