diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-22 07:15:08 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-22 07:15:08 +0000 |
commit | 7d1b202d6ed490a7773718111e5385d16b823327 (patch) | |
tree | ebe3f08474f400dc56ff9acd4ec32ba5f5116d09 | |
parent | 6ff84d99d3d4030ced8f48ef9486c9dc22429eea (diff) | |
download | edk2-platforms-7d1b202d6ed490a7773718111e5385d16b823327.tar.xz |
Update SetupBrowser to initialize the question value before extract default value so that the default expression can be evaluated correctly.
Signed-off-by: lgao4
Reviewed-by: ydong10
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12757 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 15 | ||||
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.h | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 1e592c1e9f..92582f35d8 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -3088,7 +3088,15 @@ ExtractDefault ( DestroyFormSet (LocalFormSet);
continue;
}
-
+ //
+ // Initilize Questions' Value
+ //
+ LoadFormSetConfig (NULL, LocalFormSet);
+ if (EFI_ERROR (Status)) {
+ DestroyFormSet (LocalFormSet);
+ continue;
+ }
+
//
// Add FormSet into the maintain list.
//
@@ -3122,6 +3130,7 @@ ExtractDefault ( @param Selection Selection contains the information about
the Selection, form and formset to be displayed.
Selection action may be updated in retrieve callback.
+ If Selection is NULL, only initialize Question value.
@param FormSet FormSet data structure.
@param Form Form data structure.
@@ -3160,7 +3169,7 @@ LoadFormConfig ( //
// According the spec, ref opcode try to get value from call back with "retrieve" type.
//
- if ((Question->Operand == EFI_IFR_REF_OP) && (FormSet->ConfigAccess != NULL)) {
+ if ((Question->Operand == EFI_IFR_REF_OP) && (FormSet->ConfigAccess != NULL) && (Selection != NULL)) {
Status = ProcessCallBackFunction(Selection, Question, EFI_BROWSER_ACTION_RETRIEVE, TRUE);
if (EFI_ERROR (Status)) {
return Status;
@@ -3171,6 +3180,7 @@ LoadFormConfig ( // Check whether EfiVarstore with CallBack can be got.
//
if ((FormSet->ConfigAccess != NULL) &&
+ (Selection != NULL) &&
(Selection->Action != UI_ACTION_REFRESH_FORMSET) &&
(Question->QuestionId != 0) &&
(Question->Storage != NULL) &&
@@ -3211,6 +3221,7 @@ LoadFormConfig ( @param Selection Selection contains the information about
the Selection, form and formset to be displayed.
Selection action may be updated in retrieve callback.
+ If Selection is NULL, only initialize Question value.
@param FormSet FormSet data structure.
@retval EFI_SUCCESS The function completed successfully.
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h index 6c34b4f996..168979a52a 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -1064,6 +1064,7 @@ ExtractDefault ( @param Selection Selection contains the information about
the Selection, form and formset to be displayed.
Selection action may be updated in retrieve callback.
+ If Selection is NULL, only initialize Question value.
@param FormSet FormSet data structure.
@param Form Form data structure.
@@ -1083,6 +1084,7 @@ LoadFormConfig ( @param Selection Selection contains the information about
the Selection, form and formset to be displayed.
Selection action may be updated in retrieve callback.
+ If Selection is NULL, only initialize Question value.
@param FormSet FormSet data structure.
@retval EFI_SUCCESS The function completed successfully.
|