diff options
author | Eric Dong <eric.dong@intel.com> | 2013-11-07 07:38:05 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-11-07 07:38:05 +0000 |
commit | 07d7dbaeba98b0f1b567cdb7d26de12aeae49b9a (patch) | |
tree | ad5a858d8a709436eec26458e62179da635423f2 /MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | |
parent | 9da3888456debd9c2b965278fe88a2cc08d6aee9 (diff) | |
download | edk2-platforms-07d7dbaeba98b0f1b567cdb7d26de12aeae49b9a.tar.xz |
Update the logic, based on the device path and formset guid to find the HiiHandle.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14828 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Expression.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Expression.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c index 44dae1ba03..e717196dd4 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c @@ -2036,11 +2036,7 @@ GetQuestionValueFromForm ( )
{
EFI_STATUS Status;
- EFI_HANDLE DriverHandle;
- EFI_HANDLE Handle;
- EFI_HII_HANDLE *HiiHandles;
EFI_HII_HANDLE HiiHandle;
- UINTN Index;
FORM_BROWSER_STATEMENT *Question;
FORM_BROWSER_FORMSET *FormSet;
FORM_BROWSER_FORM *Form;
@@ -2054,7 +2050,6 @@ GetQuestionValueFromForm ( (DevicePath == NULL && InputHiiHandle != NULL) );
GetTheVal = TRUE;
- DriverHandle = NULL;
HiiHandle = NULL;
Question = NULL;
Form = NULL;
@@ -2063,38 +2058,10 @@ GetQuestionValueFromForm ( // Get HiiHandle.
//
if (DevicePath != NULL) {
- //
- // 1. Get Driver handle.
- //
- Status = gBS->LocateDevicePath (
- &gEfiDevicePathProtocolGuid,
- &DevicePath,
- &DriverHandle
- );
- if (EFI_ERROR (Status) || (DriverHandle == NULL)) {
- return FALSE;
- }
-
- //
- // 2. Get Hii handle
- //
- HiiHandles = HiiGetHiiHandles (NULL);
- if (HiiHandles == NULL) {
+ HiiHandle = DevicePathToHiiHandle (DevicePath, FormSetGuid);
+ if (HiiHandle == NULL) {
return FALSE;
}
-
- for (Index = 0; HiiHandles[Index] != NULL; Index++) {
- Status = mHiiDatabase->GetPackageListHandle (
- mHiiDatabase,
- HiiHandles[Index],
- &Handle
- );
- if (!EFI_ERROR (Status) && (Handle == DriverHandle)) {
- HiiHandle = HiiHandles[Index];
- break;
- }
- }
- FreePool (HiiHandles);
} else {
HiiHandle = InputHiiHandle;
}
|