Refine the logic to handle the device path info get from string token.

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@13632 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2012-08-14 09:52:25 +00:00
parent d0bf562330
commit 33efdf51b0
4 changed files with 121 additions and 40 deletions

View File

@@ -2210,6 +2210,7 @@ EvaluateExpression (
UINT8 *TempBuffer;
EFI_TIME EfiTime;
EFI_HII_VALUE QuestionVal;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
//
// Save current stack offset.
@@ -2475,11 +2476,17 @@ EvaluateExpression (
break;
}
if (!GetQuestionValueFromForm((EFI_DEVICE_PATH_PROTOCOL*)StrPtr, NULL, &OpCode->Guid, Value->Value.u16, &QuestionVal)){
DevicePath = ConvertDevicePathFromText(StrPtr);
if (!GetQuestionValueFromForm(DevicePath, NULL, &OpCode->Guid, Value->Value.u16, &QuestionVal)){
Value->Type = EFI_IFR_TYPE_UNDEFINED;
break;
} else {
Value = &QuestionVal;
}
if (DevicePath != NULL) {
FreePool (DevicePath);
}
Value = &QuestionVal;
} else if (CompareGuid (&OpCode->Guid, &gZeroGuid) != 0) {
if (!GetQuestionValueFromForm(NULL, FormSet->HiiHandle, &OpCode->Guid, Value->Value.u16, &QuestionVal)){
Value->Type = EFI_IFR_TYPE_UNDEFINED;