mirror of https://github.com/acidanthera/audk.git
MdeModulePkg:Support orderedList with default value
Our tool can support OrderedList which has default value,but doesn't update the source code in HiiDatabase when parse the ifr data.Now update the code and add test case in DriverSample. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18388 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5c4a3795a5
commit
9495c01ee8
|
@ -234,6 +234,7 @@ formset
|
||||||
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 3, flags = 0;
|
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 3, flags = 0;
|
||||||
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = 0;
|
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = 0;
|
||||||
option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 1, flags = 0;
|
option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 1, flags = 0;
|
||||||
|
default = {1,2,3},
|
||||||
endlist;
|
endlist;
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
|
|
|
@ -1599,6 +1599,7 @@ ParseIfrData (
|
||||||
UINT16 VarWidth;
|
UINT16 VarWidth;
|
||||||
UINT16 VarDefaultId;
|
UINT16 VarDefaultId;
|
||||||
BOOLEAN FirstOneOfOption;
|
BOOLEAN FirstOneOfOption;
|
||||||
|
BOOLEAN FirstOrderedList;
|
||||||
LIST_ENTRY *LinkData;
|
LIST_ENTRY *LinkData;
|
||||||
LIST_ENTRY *LinkDefault;
|
LIST_ENTRY *LinkDefault;
|
||||||
EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;
|
EFI_IFR_VARSTORE_NAME_VALUE *IfrNameValueVarStore;
|
||||||
|
@ -1610,6 +1611,7 @@ ParseIfrData (
|
||||||
DefaultDataPtr = NULL;
|
DefaultDataPtr = NULL;
|
||||||
FirstOneOfOption = FALSE;
|
FirstOneOfOption = FALSE;
|
||||||
VarStoreId = 0;
|
VarStoreId = 0;
|
||||||
|
FirstOrderedList = FALSE;
|
||||||
ZeroMem (&DefaultData, sizeof (IFR_DEFAULT_DATA));
|
ZeroMem (&DefaultData, sizeof (IFR_DEFAULT_DATA));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1856,9 +1858,9 @@ ParseIfrData (
|
||||||
//
|
//
|
||||||
// offset by question header
|
// offset by question header
|
||||||
// width by EFI_IFR_ORDERED_LIST MaxContainers * OneofOption Type
|
// width by EFI_IFR_ORDERED_LIST MaxContainers * OneofOption Type
|
||||||
// no default value and default id, how to define its default value?
|
|
||||||
//
|
//
|
||||||
|
|
||||||
|
FirstOrderedList = TRUE;
|
||||||
//
|
//
|
||||||
// OrderedList question is not in IFR Form. This IFR form is not valid.
|
// OrderedList question is not in IFR Form. This IFR form is not valid.
|
||||||
//
|
//
|
||||||
|
@ -2102,6 +2104,10 @@ ParseIfrData (
|
||||||
|
|
||||||
IfrOneOfOption = (EFI_IFR_ONE_OF_OPTION *) IfrOpHdr;
|
IfrOneOfOption = (EFI_IFR_ONE_OF_OPTION *) IfrOpHdr;
|
||||||
if (BlockData->OpCode == EFI_IFR_ORDERED_LIST_OP) {
|
if (BlockData->OpCode == EFI_IFR_ORDERED_LIST_OP) {
|
||||||
|
|
||||||
|
if (!FirstOrderedList){
|
||||||
|
break;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// Get ordered list option data type.
|
// Get ordered list option data type.
|
||||||
//
|
//
|
||||||
|
@ -2158,10 +2164,9 @@ ParseIfrData (
|
||||||
// Add Block Data into VarStorageData BlockEntry
|
// Add Block Data into VarStorageData BlockEntry
|
||||||
//
|
//
|
||||||
InsertBlockData (&VarStorageData->BlockEntry, &BlockData);
|
InsertBlockData (&VarStorageData->BlockEntry, &BlockData);
|
||||||
//
|
|
||||||
// No default data for OrderedList.
|
FirstOrderedList = FALSE;
|
||||||
//
|
|
||||||
BlockData = NULL;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2222,12 +2227,6 @@ ParseIfrData (
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BlockData->OpCode == EFI_IFR_ORDERED_LIST_OP) {
|
|
||||||
//
|
|
||||||
// OrderedList Opcode is no default value.
|
|
||||||
//
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
// Get the DefaultId
|
// Get the DefaultId
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue