The RouteConfig() function is also called now as expected.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 OvmfPkg/PlatformConfigDxe/PlatformConfig.h        |   3 +++
 OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr |  13 +++++++++++++
 OvmfPkg/PlatformConfigDxe/PlatformConfig.c        |  22 ++++++++++++++++++++++
 OvmfPkg/PlatformConfigDxe/PlatformConfig.uni      | Bin 3016 -> 3322 bytes
 4 files changed, 38 insertions(+)

diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfig.h 
b/OvmfPkg/PlatformConfigDxe/PlatformConfig.h
index 77c4ecb..abd3df9 100644
--- a/OvmfPkg/PlatformConfigDxe/PlatformConfig.h
+++ b/OvmfPkg/PlatformConfigDxe/PlatformConfig.h
@@ -27,6 +27,9 @@
 #define LABEL_RES_NEXT         1
 #define QUESTION_RES_NEXT      2
 
+#define QUESTION_SAVE_EXIT     3
+#define QUESTION_DISCARD_EXIT  4
+
 //
 // This structure describes the form state. Its fields relate strictly to the
 // visual widgets on the form.
diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr 
b/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr
index efd4589..e69591a 100644
--- a/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr
+++ b/OvmfPkg/PlatformConfigDxe/PlatformConfigForms.vfr
@@ -56,6 +56,19 @@ formset
     // We'll dynamically generate a one-of-many selection at this label.
     //
     label LABEL_RES_NEXT;
+
+    text
+      help  = STRING_TOKEN(STR_SAVE_EXIT),
+      text  = STRING_TOKEN(STR_SAVE_EXIT),
+      flags = INTERACTIVE,
+      key   = QUESTION_SAVE_EXIT;
+
+    text
+      help  = STRING_TOKEN(STR_DISCARD_EXIT),
+      text  = STRING_TOKEN(STR_DISCARD_EXIT),
+      flags = INTERACTIVE,
+      key   = QUESTION_DISCARD_EXIT;
+
   endform;
 
 endformset;
diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfig.c 
b/OvmfPkg/PlatformConfigDxe/PlatformConfig.c
index 1ab4232..b915406 100644
--- a/OvmfPkg/PlatformConfigDxe/PlatformConfig.c
+++ b/OvmfPkg/PlatformConfigDxe/PlatformConfig.c
@@ -171,6 +171,8 @@ RouteConfig (
   OUT       EFI_STRING                      *Progress
 )
 {
+  DEBUG ((EFI_D_VERBOSE, "%a: Configuration=\"%s\"\n", __FUNCTION__,
+    Configuration));
   return EFI_SUCCESS;
 }
 
@@ -187,6 +189,26 @@ Callback (
   OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
   )
 {
+  DEBUG ((EFI_D_VERBOSE, "%a: Action=0x%Lx QuestionId=%d Type=%d\n",
+    __FUNCTION__, (UINT64) Action, QuestionId, Type));
+
+  if (Action != EFI_BROWSER_ACTION_CHANGED) {
+    return EFI_UNSUPPORTED;
+  }
+
+  switch (QuestionId) {
+  case QUESTION_SAVE_EXIT:
+    *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
+    break;
+
+  case QUESTION_DISCARD_EXIT:
+    *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
+    break;
+
+  default:
+    break;
+  }
+
   return EFI_SUCCESS;
 }
 
diff --git a/OvmfPkg/PlatformConfigDxe/PlatformConfig.uni 
b/OvmfPkg/PlatformConfigDxe/PlatformConfig.uni
index 
7fc3fa0c7528b6beadeb882820ac80919ac5a97a..0dbbdbbd91a2d9f2a153492e22719ef411d330dc
 100644
GIT binary patch
delta 176
zcmX>h{!4Ph5$?(RI3)yw85|kH7+e|RfjEM}lObgCL3Yu}7uZ=Qaj9tLGvoqcCPN8>
z0)sO{216o49z!}qDnl`l4`QbPX;+2{hRn%@T#Di@K<&Xmb&d={3@#`J3QyuvvT^|$
YRLqbJ)K~=8h}S@%l}Ze}3|wFg0OMODO8@`>

delta 12
Tcmew*c|v@{5pEV<1}+8wAn*f?

-- 
1.8.3.1



------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to