]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
Sync tool code to BuildTools project r1783.
[mirror_edk2.git] / BaseTools / Source / C / VfrCompile / VfrFormPkg.cpp
index 654daed5490ca422147c191cfe7870b8abed2e47..ffa898bdbe623c32e159d7da3926fcecf2530782 100644 (file)
@@ -2,7 +2,7 @@
   \r
   The definition of CFormPkg's member function\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation                                                         \r
+Copyright (c) 2004 - 2009, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -787,11 +787,22 @@ CIfrRecordInfoDB::IfrRecordInfoUpdate (
   )\r
 {\r
   SIfrRecord *pNode;\r
+  SIfrRecord *Prev;\r
 \r
   if ((pNode = GetRecordInfoFromIdx (RecordIdx)) == NULL) {\r
     return;\r
   }\r
 \r
+  if (LineNo == 0) {\r
+    //\r
+    // Line number is not specified explicitly, try to use line number of previous opcode\r
+    //\r
+    Prev = GetRecordInfoFromIdx (RecordIdx - 1);\r
+    if (Prev != NULL) {\r
+      LineNo = Prev->mLineNo;\r
+    }\r
+  }\r
+\r
   pNode->mLineNo    = LineNo;\r
   pNode->mOffset    = Offset;\r
   pNode->mBinBufLen = BinBufLen;\r
@@ -1217,7 +1228,7 @@ static struct {
   { sizeof (EFI_IFR_INCONSISTENT_IF), 1 },     // EFI_IFR_INCONSISTENT_IF_OP\r
   { sizeof (EFI_IFR_EQ_ID_VAL), 0 },           // EFI_IFR_EQ_ID_VAL_OP\r
   { sizeof (EFI_IFR_EQ_ID_ID), 0 },            // EFI_IFR_EQ_ID_ID_OP\r
-  { sizeof (EFI_IFR_EQ_ID_LIST), 0 },          // EFI_IFR_EQ_ID_LIST_OP - 0x14\r
+  { sizeof (EFI_IFR_EQ_ID_VAL_LIST), 0 },      // EFI_IFR_EQ_ID_LIST_OP - 0x14\r
   { sizeof (EFI_IFR_AND), 0 },                 // EFI_IFR_AND_OP\r
   { sizeof (EFI_IFR_OR), 0 },                  // EFI_IFR_OR_OP\r
   { sizeof (EFI_IFR_NOT), 0 },                 // EFI_IFR_NOT_OP\r
@@ -1290,6 +1301,7 @@ static struct {
   { 0, 0},                                     // 0x5D\r
   { sizeof (EFI_IFR_CATENATE), 0 },            // EFI_IFR_CATENATE_OP\r
   { sizeof (EFI_IFR_GUID), 0 },                // EFI_IFR_GUID_OP\r
+  { sizeof (EFI_IFR_SECURITY), 0 },            // EFI_IFR_SECURITY_OP - 0x60\r
 };\r
 \r
 #ifdef CIFROBJ_DEUBG\r
@@ -1312,6 +1324,7 @@ static struct {
   "EFI_IFR_STRING_REF1","EFI_IFR_STRING_REF2",          "EFI_IFR_CONDITIONAL",   "EFI_IFR_QUESTION_REF3",   "EFI_IFR_ZERO",          "EFI_IFR_ONE",\r
   "EFI_IFR_ONES",       "EFI_IFR_UNDEFINED",            "EFI_IFR_LENGTH",        "EFI_IFR_DUP",             "EFI_IFR_THIS",          "EFI_IFR_SPAN",\r
   "EFI_IFR_VALUE",      "EFI_IFR_DEFAULT",              "EFI_IFR_DEFAULTSTORE",  "EFI_IFR_INVALID",         "EFI_IFR_CATENATE",      "EFI_IFR_GUID",\r
+  "EFI_IFR_SECURITY",\r
 };\r
 \r
 VOID\r