X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Nt32Pkg%2FMiscSubClassPlatformDxe%2FMiscSystemSlotDesignationFunction.c;h=f62600352eb1d880ee3ea42152c6acc772ace45e;hb=9d2eedba985bea28c8821691355d447d61f4f6ed;hp=525459dad9aaf97bbc34c5c5968cc951c319a080;hpb=5e973c9630be45e950aa38c629a34033c85f9637;p=mirror_edk2.git diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c index 525459dad9..f62600352e 100644 --- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c +++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c @@ -2,14 +2,8 @@ BIOS system slot designator information boot time changes. SMBIOS type 9. -Copyright (c) 2009, Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -70,10 +64,10 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE9); SmbiosRecord->Hdr.Handle = 0; SmbiosRecord->SlotDesignation = 1; - SmbiosRecord->SlotType = ForType9InputData->SlotType; - SmbiosRecord->SlotDataBusWidth = ForType9InputData->SlotDataBusWidth; - SmbiosRecord->CurrentUsage = ForType9InputData->SlotUsage; - SmbiosRecord->SlotLength = ForType9InputData->SlotLength; + SmbiosRecord->SlotType = (UINT8)ForType9InputData->SlotType; + SmbiosRecord->SlotDataBusWidth = (UINT8)ForType9InputData->SlotDataBusWidth; + SmbiosRecord->CurrentUsage = (UINT8)ForType9InputData->SlotUsage; + SmbiosRecord->SlotLength = (UINT8)ForType9InputData->SlotLength; SmbiosRecord->SlotID = ForType9InputData->SlotId; // @@ -85,13 +79,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation) // // Now we have got the full smbios record, call smbios protocol to add this record. // - SmbiosHandle = 0; - Status = Smbios-> Add( - Smbios, - NULL, - &SmbiosHandle, - (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord - ); + Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord); + FreePool(SmbiosRecord); return Status; }