]> git.proxmox.com Git - mirror_edk2.git/commitdiff
When the CONFIG_ACCESS_PROTOCOL.CallBack function return error, the question should...
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 9 Oct 2011 10:52:54 +0000 (10:52 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 9 Oct 2011 10:52:54 +0000 (10:52 +0000)
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

MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c

index c573fdbe15878b950d632b950e54dcae2579f799..62ce070462b86c4004cccb6fcfcbb5b2af69ad94 100644 (file)
@@ -1290,11 +1290,21 @@ ProcessCallBackFunction (
       if (Action == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {\r
         SetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);\r
       }\r
-    } else if (Status == EFI_UNSUPPORTED) {\r
+    } else {\r
       //\r
-      // If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.\r
+      // According the spec, return fail from call back of "changing" and \r
+      // "retrieve", should restore the question's value.\r
       //\r
-      Status = EFI_SUCCESS;\r
+      if (Action  == EFI_BROWSER_ACTION_CHANGING || Action == EFI_BROWSER_ACTION_RETRIEVE) {\r
+        GetQuestionValue(Selection->FormSet, Selection->Form, Statement, TRUE);\r
+      }\r
+\r
+      if (Status == EFI_UNSUPPORTED) {\r
+        //\r
+        // If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.\r
+        //\r
+        Status = EFI_SUCCESS;\r
+      }\r
     }\r
   }\r
 \r