IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER DecodeHandler\r
)\r
{\r
+ UINT32 Index;\r
//\r
// Check input paramter.\r
//\r
if (SectionGuid == NULL) {\r
return RETURN_INVALID_PARAMETER;\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], SectionGuid)) {\r
+ break;\r
+ }\r
+ }\r
+\r
+ //\r
+ // If the guided handler has been registered before, only update its handler.\r
+ //\r
+ if (Index < mNumberOfExtractHandler) {\r
+ mExtractDecodeHandlerTable [Index] = DecodeHandler;\r
+ mExtractGetInfoHandlerTable [Index] = GetInfoHandler;\r
+ return RETURN_SUCCESS;\r
+ }\r
+ \r
//\r
// Check the global table is enough to contain new Handler.\r
//\r
)\r
{\r
EFI_STATUS Status;\r
+ UINT32 Index;\r
PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;\r
\r
//\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
+\r
+ //\r
+ // Search the match registered GetInfo handler for the input guided section.\r
+ //\r
+ for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) {\r
+ if (CompareGuid (&(HandlerInfo->ExtractHandlerGuidTable[Index]), SectionGuid)) {\r
+ break;\r
+ }\r
+ }\r
+\r
+ //\r
+ // If the guided handler has been registered before, only update its handler.\r
+ //\r
+ if (Index < HandlerInfo->NumberOfExtractHandler) {\r
+ HandlerInfo->ExtractDecodeHandlerTable [Index] = DecodeHandler;\r
+ HandlerInfo->ExtractGetInfoHandlerTable [Index] = GetInfoHandler;\r
+ return RETURN_SUCCESS;\r
+ }\r
+\r
//\r
// Check the global table is enough to contain new Handler.\r
//\r