]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
MdeModulePkg/UsbMassStorageDxe: Enhance Request Sense Handling
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / PiSmbiosRecordOnDataHubSmbiosRecordThunk / Translate.c
index 38b16971563c5c87cac0858d26f8ba8af31d00d2..7d674f89f4692b86152c7d35c5755dab14606df7 100644 (file)
@@ -2,7 +2,7 @@
   Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders \r
   via EFI_SMBIOS_PROTOCOL.\r
   \r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2015, 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
@@ -15,7 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "Thunk.h"\r
 \r
-EFI_GUID  ZeroGuid = { 0, 0, 0, { 0, 0, 0, 0, 0, 0, 0, 0 } };\r
 EFI_SMBIOS_PROTOCOL  *mSmbiosProtocol = NULL;\r
 \r
 /**\r
@@ -83,7 +82,7 @@ SmbiosProcessDataRecord (
     // Find a matching entry in the conversion table for this\r
     // (SubClass, RecordNumber) pair\r
     //\r
-    for (; !CompareGuid (&(mConversionTable[Index].SubClass), &ZeroGuid); Index++) {\r
+    for (; !CompareGuid (&(mConversionTable[Index].SubClass), &gZeroGuid); Index++) {\r
       if (CompareGuid (\r
             &(mConversionTable[Index].SubClass),\r
             &(RecordHeader->DataRecordGuid)\r
@@ -94,7 +93,7 @@ SmbiosProcessDataRecord (
       }\r
     }\r
 \r
-    if (CompareGuid (&(mConversionTable[Index].SubClass), &ZeroGuid)) {\r
+    if (CompareGuid (&(mConversionTable[Index].SubClass), &gZeroGuid)) {\r
       //\r
       // We cannot find a matching entry in conversion table,\r
       // this means this data record cannot be used for SMBIOS.\r
@@ -217,7 +216,7 @@ SmbiosProcessDataRecord (
         StructureNode->SmbiosType = Conversion->SmbiosType;\r
       }\r
       \r
-      StructureNode->SmbiosHandle        = 0;\r
+      StructureNode->SmbiosHandle        = SMBIOS_HANDLE_PI_RESERVED;\r
       Status = SmbiosProtocolCreateRecord (\r
                  NULL, \r
                  StructureNode\r
@@ -530,7 +529,7 @@ GetSmbiosBufferFromHandle (
   EFI_SMBIOS_TABLE_HEADER *RecordInSmbiosDatabase;\r
   EFI_STATUS              Status;\r
   \r
-  SearchingHandle = 0;\r
+  SearchingHandle = SMBIOS_HANDLE_PI_RESERVED;\r
   Smbios          = GetSmbiosProtocol();\r
   ASSERT (Smbios != NULL);\r
   \r