1. Support inconsistent if opcode used in string/password opcode.
2. Add sample code of using inconsistent if opcode in string opcode. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11196 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2077,7 +2077,11 @@ LoadFormConfig (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if ((Question->Operand == EFI_IFR_STRING_OP) || (Question->Operand == EFI_IFR_PASSWORD_OP)) {
|
||||
HiiSetString (FormSet->HiiHandle, Question->HiiValue.Value.string, (CHAR16*)Question->BufferValue, NULL);
|
||||
}
|
||||
|
||||
//
|
||||
// Check whether EfiVarstore with CallBack can be got.
|
||||
//
|
||||
@@ -2109,12 +2113,7 @@ LoadFormConfig (
|
||||
ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
|
||||
HiiValue = &Question->HiiValue;
|
||||
BufferValue = (UINT8 *) &Question->HiiValue.Value;
|
||||
if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
|
||||
//
|
||||
// Create String in HII database for Configuration Driver to retrieve
|
||||
//
|
||||
HiiValue->Value.string = NewString ((CHAR16 *) Question->BufferValue, FormSet->HiiHandle);
|
||||
} else if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
|
||||
if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) {
|
||||
BufferValue = Question->BufferValue;
|
||||
}
|
||||
|
||||
@@ -2126,14 +2125,6 @@ LoadFormConfig (
|
||||
(EFI_IFR_TYPE_VALUE *) BufferValue,
|
||||
&ActionRequest
|
||||
);
|
||||
|
||||
if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
|
||||
//
|
||||
// Clean the String in HII Database
|
||||
//
|
||||
DeleteString (HiiValue->Value.string, FormSet->HiiHandle);
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
switch (ActionRequest) {
|
||||
case EFI_BROWSER_ACTION_REQUEST_RESET:
|
||||
|
Reference in New Issue
Block a user