]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiServicesLib/PeiServicesLib.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / PeiServicesLib / PeiServicesLib.c
index 1f5e20d32bf00fc5a880af859857eeb435bc786d..e111a8e95d1aae7ff7ac3aab530ec35062548ad3 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Implementation for PEI Services Library.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2009, 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
@@ -25,7 +25,7 @@
 #include <Library/BaseMemoryLib.h>\r
 \r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_PEI_PPI_DESCRIPTOR     mPpiListTemplate [] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_PEI_PPI_DESCRIPTOR     mPpiListTemplate[] = {\r
   {\r
     (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
     &gEfiPeiFirmwareVolumeInfoPpiGuid,\r
@@ -553,9 +553,13 @@ PeiServicesInstallFvInfoPpi (
   EFI_STATUS                       Status;   \r
   EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi;\r
   EFI_PEI_PPI_DESCRIPTOR           *FvInfoPpiDescriptor;\r
+  EFI_GUID                         *ParentFvNameValue;\r
+  EFI_GUID                         *ParentFileNameValue;\r
 \r
+  ParentFvNameValue   = NULL;\r
+  ParentFileNameValue = NULL;\r
   FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));\r
-  ASSERT( FvInfoPpi != NULL);\r
+  ASSERT(FvInfoPpi != NULL);\r
 \r
   if (FvFormat != NULL) {\r
     CopyGuid (&FvInfoPpi->FvFormat, FvFormat);\r
@@ -564,9 +568,16 @@ PeiServicesInstallFvInfoPpi (
   }\r
   FvInfoPpi->FvInfo = (VOID *) FvInfo;\r
   FvInfoPpi->FvInfoSize = FvInfoSize;\r
-  FvInfoPpi->ParentFvName = (EFI_GUID *) ParentFvName;\r
-  FvInfoPpi->ParentFileName = (EFI_GUID *) ParentFileName;\r
-\r
+  if (ParentFvName != NULL) {\r
+    ParentFvNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFvName);\r
+    ASSERT (ParentFvNameValue != NULL);\r
+    FvInfoPpi->ParentFvName = ParentFvNameValue;\r
+  }\r
+  if (ParentFileName != NULL) {\r
+    ParentFileNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFileName);\r
+    ASSERT (ParentFileNameValue != NULL);\r
+    FvInfoPpi->ParentFileName = ParentFileNameValue;\r
+  }\r
 \r
   FvInfoPpiDescriptor = AllocateCopyPool (sizeof(EFI_PEI_PPI_DESCRIPTOR), mPpiListTemplate);\r
   ASSERT (FvInfoPpiDescriptor != NULL);\r