summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-15 02:54:49 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-12-15 02:54:49 +0000
commit3a4e7a3e73a40eecbb0a977a0e7421ff5743c353 (patch)
tree7a8a392f34967475ad54c929a8928e0a50a8211e /MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
parent3531262f5f4afd8b3873fb8b592437b27f9db4c9 (diff)
downloadedk2-platforms-3a4e7a3e73a40eecbb0a977a0e7421ff5743c353.tar.xz
Per UEFI spec, on CallBack action EFI_BROWSER_ACTION_CHANGING, the return value of ActionRequest will be ignored, but on CallBack action EFI_BROWSER_ACTION_CHANGED, the return value of ActionRequest will be used.
But, EDKII browser still processes the got ActionRequest. And, all HII drivers in EDKII project also returns their expected ActionRequest value on action EFI_BROWSER_ACTION_CHANGING. Now update the browser to follow the spec, and update all core Hii drivers to keep old working modal. Update for MdeModulePkg. Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12865 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c')
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c95
1 files changed, 51 insertions, 44 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 4b44330ec8..e7c1202ecf 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -1667,50 +1667,6 @@ DriverCallback (
}
break;
- case 0x1237:
- //
- // User press "Exit now", request Browser to exit
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- break;
-
- case 0x1238:
- //
- // User press "Save now", request Browser to save the uncommitted data.
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
- break;
-
- case 0x1241:
- case 0x1246:
- //
- // User press "Submit current form and Exit now", request Browser to submit current form and exit
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
- break;
-
- case 0x1242:
- //
- // User press "Discard current form now", request Browser to discard the uncommitted data.
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD;
- break;
-
- case 0x1243:
- //
- // User press "Submit current form now", request Browser to save the uncommitted data.
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
- break;
-
- case 0x1244:
- case 0x1245:
- //
- // User press "Discard current form and Exit now", request Browser to discard the uncommitted data and exit.
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
- break;
-
case 0x2000:
//
// Only used to update the state.
@@ -1751,6 +1707,57 @@ DriverCallback (
}
break;
+ case EFI_BROWSER_ACTION_CHANGED:
+ switch (QuestionId) {
+ case 0x1237:
+ //
+ // User press "Exit now", request Browser to exit
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+ break;
+
+ case 0x1238:
+ //
+ // User press "Save now", request Browser to save the uncommitted data.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
+ break;
+
+ case 0x1241:
+ case 0x1246:
+ //
+ // User press "Submit current form and Exit now", request Browser to submit current form and exit
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;
+ break;
+
+ case 0x1242:
+ //
+ // User press "Discard current form now", request Browser to discard the uncommitted data.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD;
+ break;
+
+ case 0x1243:
+ //
+ // User press "Submit current form now", request Browser to save the uncommitted data.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY;
+ break;
+
+ case 0x1244:
+ case 0x1245:
+ //
+ // User press "Discard current form and Exit now", request Browser to discard the uncommitted data and exit.
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
+ break;
+
+ default:
+ break;
+ }
+ break;
+
default:
Status = EFI_UNSUPPORTED;
break;