]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
Fix the bug that HiiConfigToBlock doesn't update BlockSize when Block is not large...
[mirror_edk2.git] / MdeModulePkg / Universal / SmbiosDxe / SmbiosDxe.c
index 9e80c3b1d37cf07f6b1dc84bb48dd8ea1eec3696..a3bb0a4752241a558326a485ecb1a79ad887494c 100644 (file)
@@ -2,8 +2,8 @@
   This code produces the Smbios protocol. It also responsible for constructing \r
   SMBIOS table into system table.\r
   \r
-Copyright (c) 2009 - 2010, 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
@@ -379,7 +379,7 @@ SmbiosAdd (
   // Build internal record Header\r
   //\r
   InternalRecord->Version     = EFI_SMBIOS_RECORD_HEADER_VERSION;\r
-  InternalRecord->HeaderSize  = sizeof (EFI_SMBIOS_RECORD_HEADER);\r
+  InternalRecord->HeaderSize  = (UINT16) sizeof (EFI_SMBIOS_RECORD_HEADER);\r
   InternalRecord->RecordSize  = RecordSize;\r
   InternalRecord->ProducerHandle = ProducerHandle;\r
   InternalRecord->NumberOfStrings = NumberOfStrings;\r
@@ -541,7 +541,7 @@ SmbiosUpdateString (
       // Build internal record Header\r
       //\r
       InternalRecord->Version     = EFI_SMBIOS_RECORD_HEADER_VERSION;\r
-      InternalRecord->HeaderSize  = sizeof (EFI_SMBIOS_RECORD_HEADER);\r
+      InternalRecord->HeaderSize  = (UINT16) sizeof (EFI_SMBIOS_RECORD_HEADER);\r
       InternalRecord->RecordSize  = SmbiosEntry->RecordHeader->RecordSize + InputStrLen - TargetStrLen;\r
       InternalRecord->ProducerHandle = SmbiosEntry->RecordHeader->ProducerHandle;\r
       InternalRecord->NumberOfStrings = SmbiosEntry->RecordHeader->NumberOfStrings;\r
@@ -864,7 +864,7 @@ SmbiosCreateTable (
   //\r
   GetMaxSmbiosHandle(SmbiosProtocol, &SmbiosHandle);\r
   EndStructure.Header.Type = EFI_SMBIOS_TYPE_END_OF_TABLE;\r
-  EndStructure.Header.Length = sizeof(EFI_SMBIOS_TABLE_HEADER);\r
+  EndStructure.Header.Length = (UINT8) sizeof (EFI_SMBIOS_TABLE_HEADER);\r
   EndStructure.Header.Handle = SmbiosHandle;\r
   EndStructure.Tailing[0] = 0;\r
   EndStructure.Tailing[1] = 0;\r