summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-14 09:52:25 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-14 09:52:25 +0000
commit33efdf51b0f123259dec0bfcff49af189b46c411 (patch)
treeca64b594e5609249f17a720ab2758342c68cbb89 /MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
parentd0bf562330e5309a92e55e44063a8ea37ead4d1d (diff)
downloadedk2-platforms-33efdf51b0f123259dec0bfcff49af189b46c411.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Expression.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Expression.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index ff46fcbc5a..27be635e9c 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -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;