Add the missing logic in HiiConfigRouting ExtractConfig() to retrieves FALSE as default value for CheckBox without default flag.

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

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11782 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2011-06-10 02:11:52 +00:00
parent 572287f8bb
commit e9668a606e
1 changed files with 44 additions and 31 deletions

View File

@ -1158,11 +1158,7 @@ ParseIfrData (
InsertBlockData (&VarStorageData->BlockEntry, &BlockData);
//
// Add default value by CheckBox Flags
//
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT) == EFI_IFR_CHECKBOX_DEFAULT) {
//
// Set standard ID to Manufacture ID
// Add default value for standard ID by CheckBox Flag
//
VarDefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
//
@ -1175,16 +1171,24 @@ ParseIfrData (
}
DefaultData->OpCode = IfrOpHdr->OpCode;
DefaultData->DefaultId = VarDefaultId;
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT) == EFI_IFR_CHECKBOX_DEFAULT) {
//
// When flag is set, defautl value is TRUE.
//
DefaultData->Value = 1;
} else {
//
// When flag is not set, defautl value is FASLE.
//
DefaultData->Value = 0;
}
//
// Add DefaultValue into current BlockData
//
InsertDefaultValue (BlockData, DefaultData);
}
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) == EFI_IFR_CHECKBOX_DEFAULT_MFG) {
//
// Set standard ID to Manufacture ID
// Add default value for Manufacture ID by CheckBox Flag
//
VarDefaultId = EFI_HII_DEFAULT_CLASS_MANUFACTURING;
//
@ -1197,12 +1201,21 @@ ParseIfrData (
}
DefaultData->OpCode = IfrOpHdr->OpCode;
DefaultData->DefaultId = VarDefaultId;
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) == EFI_IFR_CHECKBOX_DEFAULT_MFG) {
//
// When flag is set, defautl value is TRUE.
//
DefaultData->Value = 1;
} else {
//
// When flag is not set, defautl value is FASLE.
//
DefaultData->Value = 0;
}
//
// Add DefaultValue into current BlockData
//
InsertDefaultValue (BlockData, DefaultData);
}
break;
case EFI_IFR_STRING_OP: