diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-04-15 13:18:41 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2016-04-19 17:48:11 +0800 |
commit | 7f36d62918c74079a3150b87e23b62445c36b5ab (patch) | |
tree | 5de487bf83b0724f5ed79495e8c32d599b4e0be7 /MdeModulePkg | |
parent | 126f3b1de02c71fde8e28abc35a46ac5f135b527 (diff) | |
download | edk2-platforms-7f36d62918c74079a3150b87e23b62445c36b5ab.tar.xz |
MdeModulePkg/SetupBrowserDxe: Get default from callback for orderedList
For orderedlist question, the value is stored in a buffer,
not in HiiValue. So when need to get default value from callback
function for orderedlist, need to pass the buffer.
This patch is to enhance this logic.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index b357e29b3c..c36588e4bf 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -3897,6 +3897,7 @@ GetQuestionDefault ( EFI_BROWSER_ACTION_REQUEST ActionRequest;
INTN Action;
CHAR16 *NewString;
+ EFI_IFR_TYPE_VALUE *TypeValue;
Status = EFI_NOT_FOUND;
StrValue = NULL;
@@ -3917,6 +3918,13 @@ GetQuestionDefault ( // 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)
//
HiiValue = &Question->HiiValue;
+ TypeValue = &HiiValue->Value;
+ if (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL) {
+ //
+ // For orderedlist, need to pass the BufferValue to Callback function.
+ //
+ TypeValue = (EFI_IFR_TYPE_VALUE *) Question->BufferValue;
+ }
//
// Get Question defaut value from call back function.
@@ -3930,7 +3938,7 @@ GetQuestionDefault ( Action,
Question->QuestionId,
HiiValue->Type,
- &HiiValue->Value,
+ TypeValue,
&ActionRequest
);
if (!EFI_ERROR (Status)) {
|