/** @file\r
Implementation of interfaces function for EFI_HII_CONFIG_ROUTING_PROTOCOL.\r
\r
-Copyright (c) 2007 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2010, 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
http://opensource.org/licenses/bsd-license.php\r
Converts the unicode character of the string from uppercase to lowercase.\r
This is a internal function.\r
\r
- @param Str String to be converted\r
+ @param ConfigString String to be converted\r
\r
**/\r
VOID\r
/**\r
This function checks VarOffset and VarWidth is in the block range.\r
\r
- @param BlockArray The block array is to be checked. \r
+ @param RequestBlockArray The block array is to be checked. \r
@param VarOffset Offset of var to the structure\r
@param VarWidth Width of var.\r
\r
EFIAPI\r
ParseIfrData (\r
IN UINT8 *Package,\r
- IN UINT32 PackageLenth,\r
+ IN UINT32 PackageLength,\r
IN EFI_STRING ConfigHdr,\r
IN IFR_BLOCK_DATA *RequestBlockArray,\r
IN OUT IFR_VARSTORAGE_DATA *VarStorageData,\r
TempStr = NULL;\r
BlockData = NULL;\r
DefaultData = NULL;\r
+ VarDefaultName = 0;\r
\r
//\r
// Go through the form package to parse OpCode one by one.\r
//\r
IfrOffset = sizeof (EFI_HII_PACKAGE_HEADER);\r
- while (IfrOffset < PackageLenth) {\r
+ while (IfrOffset < PackageLength) {\r
IfrOpHdr = (EFI_IFR_OP_HEADER *) (Package + IfrOffset);\r
\r
switch (IfrOpHdr->OpCode) {\r
break;\r
\r
case EFI_IFR_FORM_OP:\r
+ case EFI_IFR_FORM_MAP_OP:\r
//\r
// No matched varstore is found and directly return.\r
//\r
//\r
IfrOrderedList = (EFI_IFR_ORDERED_LIST *) IfrOpHdr;\r
if (IfrOrderedList->Question.VarStoreId != VarStorageData->VarStoreId) {\r
+ BlockData = NULL;\r
break;\r
}\r
- \r
+\r
//\r
// Get Offset/Width by Question header and OneOf Flags\r
//\r
VarOffset = IfrOrderedList->Question.VarStoreInfo.VarOffset;\r
VarWidth = IfrOrderedList->MaxContainers;\r
-\r
- //\r
- // Check whether this question is in requested block array.\r
- //\r
- if (!BlockArrayCheck (RequestBlockArray, VarOffset, VarWidth)) {\r
- //\r
- // This question is not in the requested string. Skip it.\r
- //\r
- break;\r
- }\r
-\r
- //\r
- // Check this var question is in the var storage \r
- //\r
- if ((VarOffset + VarWidth) > VarStorageData->Size) {\r
- Status = EFI_INVALID_PARAMETER;\r
- goto Done;\r
- }\r
\r
//\r
// Set Block Data\r
BlockData->OpCode = IfrOpHdr->OpCode;\r
BlockData->Scope = IfrOpHdr->Scope;\r
InitializeListHead (&BlockData->DefaultValueEntry);\r
- \r
- //\r
- // Add Block Data into VarStorageData BlockEntry\r
- //\r
- InsertBlockData (&VarStorageData->BlockEntry, &BlockData);\r
break;\r
\r
case EFI_IFR_CHECKBOX_OP:\r
// Invalid ordered list option data type.\r
//\r
Status = EFI_INVALID_PARAMETER;\r
+ FreePool (BlockData);\r
goto Done;\r
}\r
+\r
//\r
// Calculate Ordered list QuestionId width.\r
//\r
BlockData->Width = (UINT16) (BlockData->Width * VarWidth);\r
+ //\r
+ // Check whether this question is in requested block array.\r
+ //\r
+ if (!BlockArrayCheck (RequestBlockArray, BlockData->Offset, BlockData->Width)) {\r
+ //\r
+ // This question is not in the requested string. Skip it.\r
+ //\r
+ FreePool (BlockData);\r
+ BlockData = NULL;\r
+ break;\r
+ }\r
+ //\r
+ // Check this var question is in the var storage \r
+ //\r
+ if ((BlockData->Offset + BlockData->Width) > VarStorageData->Size) {\r
+ Status = EFI_INVALID_PARAMETER;\r
+ FreePool (BlockData);\r
+ goto Done;\r
+ }\r
+ //\r
+ // Add Block Data into VarStorageData BlockEntry\r
+ //\r
+ InsertBlockData (&VarStorageData->BlockEntry, &BlockData);\r
+ //\r
+ // No default data for OrderedList.\r
+ //\r
BlockData = NULL;\r
break;\r
}\r
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
instance.\r
@param ConfigResp A null-terminated Unicode string in <ConfigResp>\r
- format. It can be ConfigAltResp format string.\r
+ format.\r
@param Block A possibly null array of bytes representing the\r
current block. Only bytes referenced in the\r
ConfigResp string in the block are modified. If\r
@param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r
instance.\r
@param Configuration A null-terminated Unicode string in\r
- <MultiConfigAltResp> format. It is <ConfigAltResp> format.\r
+ <MultiConfigAltResp> format.\r
@param Guid A pointer to the GUID value to search for in the\r
routing portion of the ConfigResp string when\r
retrieving the requested data. If Guid is NULL,\r