diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-09 10:52:54 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-09 10:52:54 +0000 |
commit | c4042207d6dc10b786506db0b1fa897e723123f1 (patch) | |
tree | 45c33fd7fc59b5423f19a63bb586cc0cac26f4e7 | |
parent | 269218a3006c2b00e88948ed847f614cf28f4def (diff) | |
download | edk2-platforms-c4042207d6dc10b786506db0b1fa897e723123f1.tar.xz |
When the CONFIG_ACCESS_PROTOCOL.CallBack function return error, the question should restore to old value
Signed-off-by:ydong10
Reviewed-by:lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12518 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index c573fdbe15..62ce070462 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1290,11 +1290,21 @@ ProcessCallBackFunction ( if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {
SetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);
}
- } else if (Status == EFI_UNSUPPORTED) {
+ } else {
//
- // If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.
+ // According the spec, return fail from call back of "changing" and
+ // "retrieve", should restore the question's value.
//
- Status = EFI_SUCCESS;
+ if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {
+ GetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);
+ }
+
+ if (Status == EFI_UNSUPPORTED) {
+ //
+ // If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.
+ //
+ Status = EFI_SUCCESS;
+ }
}
}
|