Update the code of processing device path info in browser to follow UEFI spec.

Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14076 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2013-01-22 09:49:44 +00:00
parent 7f7dba5c86
commit 80a047f04a
8 changed files with 57 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
/** @file
Utility functions for expression evaluation.
Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2470,22 +2470,21 @@ EvaluateExpression (
}
if (OpCode->DevicePath != 0) {
Value->Type = EFI_IFR_TYPE_UNDEFINED;
StrPtr = GetToken (OpCode->DevicePath, FormSet->HiiHandle);
if (StrPtr == NULL) {
Value->Type = EFI_IFR_TYPE_UNDEFINED;
break;
if (StrPtr != NULL && mPathFromText != NULL) {
DevicePath = mPathFromText->ConvertTextToDevicePath(StrPtr);
if (DevicePath != NULL && GetQuestionValueFromForm(DevicePath, NULL, &OpCode->Guid, Value->Value.u16, &QuestionVal)) {
Value = &QuestionVal;
}
if (DevicePath != NULL) {
FreePool (DevicePath);
}
}
DevicePath = ConvertDevicePathFromText(StrPtr);
if (!GetQuestionValueFromForm(DevicePath, NULL, &OpCode->Guid, Value->Value.u16, &QuestionVal)){
Value->Type = EFI_IFR_TYPE_UNDEFINED;
} else {
Value = &QuestionVal;
}
if (DevicePath != NULL) {
FreePool (DevicePath);
if (StrPtr != NULL) {
FreePool (StrPtr);
}
} else if (CompareGuid (&OpCode->Guid, &gZeroGuid) != 0) {
if (!GetQuestionValueFromForm(NULL, FormSet->HiiHandle, &OpCode->Guid, Value->Value.u16, &QuestionVal)){