]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EFI_HII_DATABASE_PROTOCOL.NewPackageList() allows installation of multiple package...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 20 Nov 2009 02:34:21 +0000 (02:34 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 20 Nov 2009 02:34:21 +0000 (02:34 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9452 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Include/Library/HiiLib.h
MdeModulePkg/Library/UefiHiiLib/HiiLib.c
MdeModulePkg/Universal/HiiDatabaseDxe/Database.c

index 9a040326c08ac4a86757459fe6d9f340b007b93c..e39ed8e26044198604d2fde635f1f8fdaf10c5d0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Public include file for the HII Library\r
 \r
-  Copyright (c) 2007 - 2008, Intel Corporation                                                         \r
+  Copyright (c) 2007 - 2009, Intel Corporation                                                         \r
   All rights reserved. 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
 /**\r
   Registers a list of packages in the HII Database and returns the HII Handle\r
   associated with that registration.  If an HII Handle has already been registered\r
-  with the same PackageListGuid, then NULL is returned.  If there are not enough \r
-  resources to perform the registration, then NULL is returned.  If an empty list \r
-  of packages is passed in, then NULL is returned.  If the size of the list of \r
-  package is 0, then NULL is returned.\r
+  with the same PackageListGuid and DeviceHandle, then NULL is returned.  If there\r
+  are not enough resources to perform the registration, then NULL is returned.\r
+  If an empty list of packages is passed in, then NULL is returned.  If the size of\r
+  the list of package is 0, then NULL is returned.\r
 \r
   The variable arguments are pointers that point to package headers defined \r
   by UEFI VFR compiler and StringGather tool.\r
index 2a42cd799e1e8aa3e1a5e0d51bdd548077392f01..56bf55bcaa77b158c492d7cc1a9ce94f68ea7a4a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HII Library implementation that uses DXE protocols and services.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
   All rights reserved. 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
@@ -105,10 +105,10 @@ InternalHiiExtractGuidFromHiiHandle (
 /**\r
   Registers a list of packages in the HII Database and returns the HII Handle\r
   associated with that registration.  If an HII Handle has already been registered\r
-  with the same PackageListGuid, then NULL is returned.  If there are not enough \r
-  resources to perform the registration, then NULL is returned.  If an empty list \r
-  of packages is passed in, then NULL is returned.  If the size of the list of \r
-  package is 0, then NULL is returned.\r
+  with the same PackageListGuid and DeviceHandle, then NULL is returned.  If there\r
+  are not enough resources to perform the registration, then NULL is returned.\r
+  If an empty list of packages is passed in, then NULL is returned.  If the size of\r
+  the list of package is 0, then NULL is returned.\r
 \r
   The variable arguments are pointers which point to package header that defined \r
   by UEFI VFR compiler and StringGather tool.\r
@@ -145,7 +145,6 @@ HiiAddPackages (
   )\r
 {\r
   EFI_STATUS                   Status;\r
-  EFI_HII_HANDLE               *HiiHandleBuffer;\r
   VA_LIST                      Args;\r
   UINT32                       *Package;\r
   EFI_HII_PACKAGE_LIST_HEADER  *PackageListHeader;\r
@@ -155,16 +154,6 @@ HiiAddPackages (
 \r
   ASSERT (PackageListGuid != NULL);\r
 \r
-  //\r
-  // Check to see if an HII Handle has already been registered with the same \r
-  // PackageListGuid\r
-  //\r
-  HiiHandleBuffer = HiiGetHiiHandles (PackageListGuid);\r
-  if (HiiHandleBuffer != NULL) {\r
-    FreePool (HiiHandleBuffer);\r
-    return NULL;\r
-  }\r
-\r
   //\r
   // Calculate the length of all the packages in the variable argument list\r
   //\r
@@ -192,7 +181,7 @@ HiiAddPackages (
   PackageListHeader = AllocateZeroPool (Length);\r
 \r
   //\r
-  // If the Packahge List can not be allocated, then return a NULL HII Handle\r
+  // If the Package List can not be allocated, then return a NULL HII Handle\r
   //\r
   if (PackageListHeader == NULL) {\r
     return NULL;\r
index 918559e54490b4c875dba51e27ff89bad0872646..6c0062db7cdde2b83783bc2478b7be9c294639bc 100644 (file)
@@ -1,8 +1,7 @@
 /** @file\r
 Implementation for EFI_HII_DATABASE_PROTOCOL.\r
 \r
-\r
-Copyright (c) 2007 - 2008, Intel Corporation\r
+Copyright (c) 2007 - 2009, Intel Corporation\r
 All rights reserved. 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
@@ -2740,9 +2739,8 @@ HiiNewPackageList (
     DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE);\r
     if (CompareGuid (\r
           &(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid),\r
-          &PackageListGuid\r
-          )\r
-        ) {\r
+          &PackageListGuid) && \r
+        DatabaseRecord->DriverHandle == DriverHandle) {\r
       return EFI_INVALID_PARAMETER;\r
     }\r
   }\r