MdeModulePkg: Enable buffer type value for default and oneofoption opcode.

In order to support default value for orderedlist opcode, support buffer type value for default/oneofoption opcode.
If oneofoption used as a default value, it will not be added to normal option list.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17336 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2015-05-06 09:36:40 +00:00
committed by ydong10
parent ddaf640f50
commit 0b567d184d
2 changed files with 40 additions and 2 deletions

View File

@@ -3859,7 +3859,12 @@ GetQuestionDefault (
//
// Default value is embedded in EFI_IFR_DEFAULT
//
CopyMem (HiiValue, &Default->Value, sizeof (EFI_HII_VALUE));
if (Default->Value.Type == EFI_IFR_TYPE_BUFFER) {
ASSERT (HiiValue->Buffer != NULL);
CopyMem (HiiValue->Buffer, Default->Value.Buffer, Default->Value.BufferLen);
} else {
CopyMem (HiiValue, &Default->Value, sizeof (EFI_HII_VALUE));
}
}
if (HiiValue->Type == EFI_IFR_TYPE_STRING) {