summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2015-01-09 02:38:39 +0000
committerydong10 <ydong10@Edk2>2015-01-09 02:38:39 +0000
commitc792e5b8a3fb103c1e06663f44fa9bda801fc31b (patch)
treef049443bced4d0d43fe2933e2dc507b970796cb3
parent5c7956a2a3324ef47e95f3a350e901b2ddfef69c (diff)
downloadedk2-c792e5b8a3fb103c1e06663f44fa9bda801fc31b.tar.gz
edk2-c792e5b8a3fb103c1e06663f44fa9bda801fc31b.tar.bz2
edk2-c792e5b8a3fb103c1e06663f44fa9bda801fc31b.zip
Restore question value for question without storage after CHANGING callback return error.
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@16592 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index ad39d22a9d..8fd1c088bc 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -1,7 +1,7 @@
/** @file
Utility functions for UI presentation.
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2048,8 +2048,15 @@ ProcessCallBackFunction (
// According the spec, return fail from call back of "changing" and
// "retrieve", should restore the question's value.
//
- if ((Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) ||
- Action == EFI_BROWSER_ACTION_RETRIEVE) {
+ if (Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) {
+ if (Statement->Storage != NULL) {
+ GetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer);
+ } else if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != 0) {
+ ProcessCallBackFunction (Selection, FormSet, Form, Question, EFI_BROWSER_ACTION_RETRIEVE, FALSE);
+ }
+ }
+
+ if (Action == EFI_BROWSER_ACTION_RETRIEVE) {
GetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer);
}