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
This commit is contained in:
ydong10
2011-12-15 02:54:49 +00:00
parent 3531262f5f
commit 3a4e7a3e73
9 changed files with 224 additions and 182 deletions

View File

@@ -239,16 +239,23 @@ VlanCallback (
return EFI_SUCCESS;
}
if (Action == EFI_BROWSER_ACTION_CHANGING) {
if ((Action != EFI_BROWSER_ACTION_CHANGED) && (Action != EFI_BROWSER_ACTION_CHANGING)) {
//
// Get Browser data
// All other action return unsupported.
//
Configuration = AllocateZeroPool (sizeof (VLAN_CONFIGURATION));
ASSERT (Configuration != NULL);
HiiGetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration);
return EFI_UNSUPPORTED;
}
VlanConfig = PrivateData->VlanConfig;
//
// Get Browser data
//
Configuration = AllocateZeroPool (sizeof (VLAN_CONFIGURATION));
ASSERT (Configuration != NULL);
HiiGetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration);
VlanConfig = PrivateData->VlanConfig;
if (Action == EFI_BROWSER_ACTION_CHANGED) {
switch (QuestionId) {
case VLAN_ADD_QUESTION_ID:
//
@@ -304,6 +311,11 @@ VlanCallback (
ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);
break;
default:
break;
}
} else if (Action == EFI_BROWSER_ACTION_CHANGING) {
switch (QuestionId) {
case VLAN_UPDATE_QUESTION_ID:
//
// Update current VLAN list into Form.
@@ -314,16 +326,11 @@ VlanCallback (
default:
break;
}
HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL);
FreePool (Configuration);
return EFI_SUCCESS;
}
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL);
FreePool (Configuration);
return EFI_SUCCESS;
}