/** @file\r
Provide generic extract guided section functions for Dxe phase.\r
\r
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\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
)\r
{\r
UINT32 Index;\r
+ EFI_GUID *SectionDefinitionGuid;\r
\r
ASSERT (InputSection != NULL); \r
ASSERT (OutputBufferSize != NULL);\r
ASSERT (ScratchBufferSize != NULL);\r
ASSERT (SectionAttribute != NULL);\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 < mNumberOfExtractHandler; Index ++) {\r
- if (CompareGuid (&mExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {\r
//\r
// Call the match handler to getinfo for the input section data.\r
//\r
)\r
{\r
UINT32 Index;\r
+ EFI_GUID *SectionDefinitionGuid;\r
\r
//\r
// Check the input parameters\r
ASSERT (OutputBuffer != NULL);\r
ASSERT (AuthenticationStatus != NULL);\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 extract handler for the input guided section.\r
//\r
for (Index = 0; Index < mNumberOfExtractHandler; Index ++) {\r
- if (CompareGuid (&mExtractHandlerGuidTable[Index], &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) {\r
+ if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) {\r
//\r
// Call the match handler to extract raw data for the input section data.\r
//\r