Update HiiBlockToConfig function to follow spec.

Signed-off-by: ydong10
Reviewed-by: lgao4



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12249 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-09-01 08:19:55 +00:00
parent 25dd150b58
commit 41ff10dc06
1 changed files with 11 additions and 4 deletions

View File

@ -3393,6 +3393,7 @@ HiiBlockToConfig (
UINTN Index; UINTN Index;
UINT8 *TemBuffer; UINT8 *TemBuffer;
CHAR16 *TemString; CHAR16 *TemString;
CHAR16 TemChar;
if (This == NULL || Progress == NULL || Config == NULL) { if (This == NULL || Progress == NULL || Config == NULL) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -3442,8 +3443,12 @@ HiiBlockToConfig (
StringPtr++; StringPtr++;
} }
if (*StringPtr == 0) { if (*StringPtr == 0) {
*Progress = StringPtr - 1; *Progress = StringPtr;
Status = EFI_INVALID_PARAMETER; Status = EFI_SUCCESS;
AppendToMultiString(Config, ConfigRequest);
HiiToLower (*Config);
goto Exit; goto Exit;
} }
// //
@ -3454,8 +3459,10 @@ HiiBlockToConfig (
// //
// Copy <ConfigHdr> and an additional '&' to <ConfigResp> // Copy <ConfigHdr> and an additional '&' to <ConfigResp>
// //
Length = StringPtr - ConfigRequest; TemChar = *StringPtr;
CopyMem (*Config, ConfigRequest, Length * sizeof (CHAR16)); *StringPtr = '\0';
AppendToMultiString(Config, ConfigRequest);
*StringPtr = TemChar;
// //
// Parse each <RequestElement> if exists // Parse each <RequestElement> if exists