]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
Update HiiBlockToConfig function to follow spec.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Presentation.c
index 2c9fa9761ab8c267194ba193707da30c9cc459d1..863097d00540aa77fa7fa97c467f80be5e56380f 100644 (file)
@@ -1162,6 +1162,14 @@ ProcessCallBackFunction (
       default:\r
         break;\r
       }\r
+\r
+      //\r
+      // According the spec, return value from call back of "changing" and \r
+      // "retrieve" should update to the question's temp buffer.\r
+      //\r
+      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
       //\r
       // If return EFI_UNSUPPORTED, also consider Hii driver suceess deal with it.\r
@@ -1384,11 +1392,18 @@ SetupBrowser (
           (Statement->Operand != EFI_IFR_PASSWORD_OP)) {\r
 \r
         Status = ProcessCallBackFunction(Selection, Statement, EFI_BROWSER_ACTION_CHANGING, FALSE);         \r
-        if ((EFI_ERROR (Status)) && (Status != EFI_UNSUPPORTED)) {\r
+        if (Statement->Operand == EFI_IFR_REF_OP && Selection->Action != UI_ACTION_EXIT) {\r
+          //\r
+          // Process dynamic update ref opcode.\r
+          //\r
+          if (!EFI_ERROR (Status)) {\r
+            Status = ProcessGotoOpCode(Statement, Selection, NULL, NULL);\r
+          }\r
+          \r
           //\r
-          // Callback return error status other than EFI_UNSUPPORTED\r
+          // Callback return error status or status return from process goto opcode.\r
           //\r
-          if (Statement->Operand == EFI_IFR_REF_OP) {\r
+          if (EFI_ERROR (Status)) {\r
             //\r
             // Cross reference will not be taken\r
             //\r