diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-10 02:11:52 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-10 02:11:52 +0000 |
commit | e9668a606e6e518025b70487333f17e72a15b8e2 (patch) | |
tree | 223c55885f713bac5b02e4820a0b604523564ce5 /MdeModulePkg/Universal | |
parent | 572287f8bb38953891c53a43d2231ce1e3f36523 (diff) | |
download | edk2-platforms-e9668a606e6e518025b70487333f17e72a15b8e2.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 75 |
1 files changed, 44 insertions, 31 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 02d7d7b5fa..29576ba477 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -1158,51 +1158,64 @@ ParseIfrData ( InsertBlockData (&VarStorageData->BlockEntry, &BlockData);
//
- // Add default value by CheckBox Flags
+ // Add default value for standard ID by CheckBox Flag
//
+ VarDefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
+ //
+ // Prepare new DefaultValue
+ //
+ DefaultData = (IFR_DEFAULT_DATA *) AllocateZeroPool (sizeof (IFR_DEFAULT_DATA));
+ if (DefaultData == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto Done;
+ }
+ DefaultData->OpCode = IfrOpHdr->OpCode;
+ DefaultData->DefaultId = VarDefaultId;
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT) == EFI_IFR_CHECKBOX_DEFAULT) {
//
- // Set standard ID to Manufacture ID
- //
- VarDefaultId = EFI_HII_DEFAULT_CLASS_STANDARD;
- //
- // Prepare new DefaultValue
+ // When flag is set, defautl value is TRUE.
//
- DefaultData = (IFR_DEFAULT_DATA *) AllocateZeroPool (sizeof (IFR_DEFAULT_DATA));
- if (DefaultData == NULL) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
- DefaultData->OpCode = IfrOpHdr->OpCode;
- DefaultData->DefaultId = VarDefaultId;
- DefaultData->Value = 1;
+ DefaultData->Value = 1;
+ } else {
//
- // Add DefaultValue into current BlockData
+ // When flag is not set, defautl value is FASLE.
//
- InsertDefaultValue (BlockData, DefaultData);
+ DefaultData->Value = 0;
}
+ //
+ // Add DefaultValue into current BlockData
+ //
+ InsertDefaultValue (BlockData, DefaultData);
+ //
+ // Add default value for Manufacture ID by CheckBox Flag
+ //
+ VarDefaultId = EFI_HII_DEFAULT_CLASS_MANUFACTURING;
+ //
+ // Prepare new DefaultValue
+ //
+ DefaultData = (IFR_DEFAULT_DATA *) AllocateZeroPool (sizeof (IFR_DEFAULT_DATA));
+ if (DefaultData == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ goto Done;
+ }
+ DefaultData->OpCode = IfrOpHdr->OpCode;
+ DefaultData->DefaultId = VarDefaultId;
if ((IfrCheckBox->Flags & EFI_IFR_CHECKBOX_DEFAULT_MFG) == EFI_IFR_CHECKBOX_DEFAULT_MFG) {
//
- // Set standard ID to Manufacture ID
- //
- VarDefaultId = EFI_HII_DEFAULT_CLASS_MANUFACTURING;
- //
- // Prepare new DefaultValue
+ // When flag is set, defautl value is TRUE.
//
- DefaultData = (IFR_DEFAULT_DATA *) AllocateZeroPool (sizeof (IFR_DEFAULT_DATA));
- if (DefaultData == NULL) {
- Status = EFI_OUT_OF_RESOURCES;
- goto Done;
- }
- DefaultData->OpCode = IfrOpHdr->OpCode;
- DefaultData->DefaultId = VarDefaultId;
- DefaultData->Value = 1;
+ DefaultData->Value = 1;
+ } else {
//
- // Add DefaultValue into current BlockData
+ // When flag is not set, defautl value is FASLE.
//
- InsertDefaultValue (BlockData, DefaultData);
+ DefaultData->Value = 0;
}
+ //
+ // Add DefaultValue into current BlockData
+ //
+ InsertDefaultValue (BlockData, DefaultData);
break;
case EFI_IFR_STRING_OP:
|