diff options
author | Eric Dong <eric.dong@intel.com> | 2015-05-06 09:36:40 +0000 |
---|---|---|
committer | ydong10 <ydong10@Edk2> | 2015-05-06 09:36:40 +0000 |
commit | 0b567d184dbfd3baa75370df8c8f3b24da5d9a70 (patch) | |
tree | cbd9b319c93cc3c340a9ca166febad76ddb8979e /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | |
parent | ddaf640f507314440ec68c2a2370b6bb9b6a8580 (diff) | |
download | edk2-platforms-0b567d184dbfd3baa75370df8c8f3b24da5d9a70.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 964682399c..5cf13cec59 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -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) {
|