summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Compatibility
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-02 01:25:55 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-02 01:25:55 +0000
commit59e87364cce43a3ec7687ee53f3a91d93901e2d4 (patch)
tree07cb9d18aad5315fdba08abcc271b67852788b2e /EdkCompatibilityPkg/Compatibility
parentebe43565f9f7ace6d19410c397c0df7482b022f3 (diff)
downloadedk2-platforms-59e87364cce43a3ec7687ee53f3a91d93901e2d4.tar.xz
Save the type of OneOf question.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5769 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility')
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c
index 98582e8c43..638d835286 100644
--- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c
+++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c
@@ -328,6 +328,13 @@ CreateQuestionIdMap (
ONE_OF_OPTION_MAP_ENTRY *OneOfOptionMapEntry;
EFI_IFR_GUID_CLASS *Class;
EFI_IFR_GUID_SUBCLASS *SubClass;
+ UINT8 OneOfType;
+ EFI_IFR_ONE_OF *OneOfOpcode;
+
+ //
+ // Set to a invalid value.
+ //
+ OneOfType = (UINT8) -1;
Status = HiiLibExportPackageLists (ThunkContext->UefiHiiHandle, &List, &Size);
@@ -402,6 +409,11 @@ CreateQuestionIdMap (
InsertTailList (QuestionIdMapEntryListHead, &IdMapEntry->Link);
}
+ if (OpCode->OpCode == EFI_IFR_ONE_OF_OP) {
+ OneOfOpcode = (EFI_IFR_ONE_OF *) OpCode;
+ OneOfType = OneOfOpcode->Flags & EFI_IFR_NUMERIC_SIZE;
+ }
+
break;
case EFI_IFR_GUID_OP:
@@ -415,7 +427,12 @@ CreateQuestionIdMap (
OneOfOptionMap->Signature = ONE_OF_OPTION_MAP_SIGNATURE;
OneOfOptionMap->QuestionId = OptionMap->QuestionId;
- OneOfOptionMap->ValueType = EFI_IFR_TYPE_NUM_SIZE_8;
+
+ //
+ // Make sure OneOfType is initialized.
+ //
+ ASSERT (OneOfType != (UINT8) -1);
+ OneOfOptionMap->ValueType = OneOfType;
InitializeListHead (&OneOfOptionMap->OneOfOptionMapEntryListHead);
OneOfOptinMapEntryListHead = &OneOfOptionMap->OneOfOptionMapEntryListHead;
InsertTailList (&ThunkContext->OneOfOptionMapListHead, &OneOfOptionMap->Link);