]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
ECP MpServicesOnFrameworkMpServicesThunk: Fix build with GCC
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / PiSmbiosRecordOnDataHubSmbiosRecordThunk / Translate.c
index 3230d9657619d0b3b5502c12ad90b0fc88033980..851fb06c032720ac5f8d13ed5960a7356e4bbcfa 100644 (file)
@@ -2,8 +2,8 @@
   Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders \r
   via EFI_SMBIOS_PROTOCOL.\r
   \r
-Copyright (c) 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -117,7 +117,7 @@ SmbiosProcessDataRecord (
                         SMBIOS_STRUCTURE_NODE_SIGNATURE\r
                         );\r
 \r
-      if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER) {\r
+      if (Conversion->StructureLocatingMethod == BySubclassInstanceSubinstanceProducer) {\r
         //\r
         // Look at SubClass, Instance, SubInstance and ProducerName for a matching\r
         // node\r
@@ -136,7 +136,7 @@ SmbiosProcessDataRecord (
           }\r
         }\r
 \r
-      } else if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_PRODUCER) {\r
+      } else if (Conversion->StructureLocatingMethod == BySubClassInstanceProducer) {\r
         //\r
         // Look at SubClass, Instance and ProducerName for a matching node\r
         //\r
@@ -161,7 +161,7 @@ SmbiosProcessDataRecord (
       }\r
     }\r
 \r
-    if (Link == &mStructureList) {\r
+    if (Link == &mStructureList || StructureNode == NULL) {\r
 \r
       //\r
       // Not found, create a new structure\r
@@ -172,7 +172,7 @@ SmbiosProcessDataRecord (
         goto Done;\r
       }\r
 \r
-      if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_SUBINSTANCE_PRODUCER) {\r
+      if (Conversion->StructureLocatingMethod == BySubclassInstanceSubinstanceProducer) {\r
         //\r
         // Fill in SubClass, Instance, SubInstance and ProducerName\r
         //\r
@@ -181,7 +181,7 @@ SmbiosProcessDataRecord (
         StructureNode->SubInstance  = DataHeader->SubInstance;\r
         CopyMem (&(StructureNode->ProducerName), &(RecordHeader->ProducerName), sizeof (EFI_GUID));\r
 \r
-      } else if (Conversion->StructureLocatingMethod == BY_SUBCLASS_INSTANCE_PRODUCER) {\r
+      } else if (Conversion->StructureLocatingMethod == BySubClassInstanceProducer) {\r
         //\r
         // Fill in at SubClass, Instance and ProducerName, mark SubInstance as Non\r
         // Applicable\r
@@ -244,7 +244,7 @@ SmbiosProcessDataRecord (
     //\r
     // Fill the Structure's field corresponding to this data record\r
     //\r
-    if (Conversion->FieldFillingMethod == RECORD_DATA_UNCHANGED_OFFSET_SPECIFIED) {\r
+    if (Conversion->FieldFillingMethod == RecordDataUnchangedOffsetSpecified) {\r
       //\r
       // Field data is just the record data without transforming and\r
       // offset is specified directly in the conversion table entry\r
@@ -262,7 +262,7 @@ SmbiosProcessDataRecord (
       \r
       CopyMem ((UINT8 *) (StructureNode->Structure) + Conversion->FieldOffset, SrcData, SrcDataSize);\r
 \r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION_WITH_OFFSET_SPECIFIED) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunctionWithOffsetSpecified) {\r
       //\r
       // Field offfset is specified in the conversion table entry, but\r
       // record data needs to be transformed to be filled into the field,\r
@@ -292,7 +292,7 @@ SmbiosProcessDataRecord (
 \r
         goto Done;\r
       }\r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunction) {\r
       //\r
       // Both field offset and field content are determined by\r
       // FieldFillingFunction\r
@@ -321,7 +321,7 @@ SmbiosProcessDataRecord (
 \r
         goto Done;\r
       }\r
-    } else if (Conversion->FieldFillingMethod == BY_FUNCTION_WITH_WHOLE_DATA_RECORD) {\r
+    } else if (Conversion->FieldFillingMethod == ByFunctionWithWholeDataRecord) {\r
       //\r
       // Both field offset and field content are determined by\r
       // FieldFillingFunction and the function accepts the whole data record\r