if (OpCode->VarStorage != NULL) {\r
switch (OpCode->VarStorage->Type) {\r
case EFI_HII_VARSTORE_BUFFER:\r
+ case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:\r
//\r
// Get value from Edit Buffer\r
//\r
Value->Type = EFI_IFR_TYPE_UNDEFINED;\r
Value->Value.u8 = 0;\r
}\r
+ break;\r
default:\r
//\r
// Not recognize storage.\r
//\r
// When converting from a string, if case-insensitive compare\r
// with "true" is True, then push True. If a case-insensitive compare\r
- // with "false" is True, then push False.\r
+ // with "false" is True, then push False. Otherwise, push Undefined. \r
//\r
StrPtr = GetToken (Value->Value.string, FormSet->HiiHandle);\r
if (StrPtr == NULL) {\r
Status = EFI_INVALID_PARAMETER;\r
goto Done;\r
}\r
-\r
- if ((StrCmp (StrPtr, L"true") == 0) || (StrCmp (StrPtr, L"false") == 0)){\r
+ \r
+ IfrStrToUpper (StrPtr);\r
+ if (StrCmp (StrPtr, L"TRUE") == 0){\r
Value->Value.b = TRUE;\r
- } else {\r
+ } else if (StrCmp (StrPtr, L"FALSE") == 0) {\r
Value->Value.b = FALSE;\r
+ } else {\r
+ Status = EFI_INVALID_PARAMETER;\r
+ FreePool (StrPtr);\r
+ goto Done;\r
}\r
FreePool (StrPtr);\r
Value->Type = EFI_IFR_TYPE_BOOLEAN;\r
if (OpCode->VarStorage != NULL) {\r
switch (OpCode->VarStorage->Type) {\r
case EFI_HII_VARSTORE_BUFFER:\r
+ case EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER:\r
CopyMem (OpCode->VarStorage->EditBuffer + OpCode->VarStoreInfo.VarOffset, &Value->Value, OpCode->ValueWidth);\r
Data1.Value.b = TRUE;\r
break;\r