]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update function comments HiiLibListPackageLists
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 12:38:21 +0000 (12:38 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Sep 2008 12:38:21 +0000 (12:38 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5961 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/HiiLib/HiiLib.c

index cee31b20ae9cba6286454b786622b2a0a3108fcd..b98b3604508393157a119fef3ab9e30f1e0d6321 100644 (file)
@@ -573,13 +573,49 @@ HiiLibExportPackageLists (
   return Status;\r
 }\r
 \r
+/**\r
+  \r
+  This function returns a list of the package handles of the   \r
+  specified type that are currently active in the HII database. The   \r
+  pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package   \r
+  handles to be listed.\r
 \r
+  If HandleBufferLength is NULL, then ASSERT.\r
+  If HandleBuffer is NULL, the ASSERT.\r
+  If PackageType is EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is\r
+  NULL, then ASSERT.\r
+  If PackageType is not EFI_HII_PACKAGE_TYPE_GUID and PackageGuid is not\r
+  NULL, then ASSERT.\r
+  \r
+  \r
+  @param PackageType          Specifies the package type of the packages\r
+                              to list or EFI_HII_PACKAGE_TYPE_ALL for\r
+                              all packages to be listed.\r
+  \r
+  @param PackageGuid          If PackageType is\r
+                              EFI_HII_PACKAGE_TYPE_GUID, then this is\r
+                              the pointer to the GUID which must match\r
+                              the Guid field of\r
+                              EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it\r
+                              must be NULL.\r
+  \r
+  @param HandleBufferLength   On output, the length of the handle buffer\r
+                              that is required for the handles found.\r
+\r
+  @param HandleBuffer         On output, an array of EFI_HII_HANDLE  instances returned.\r
+                              The caller is responcible to free this pointer allocated.\r
+\r
+  @retval EFI_SUCCESS           The matching handles are outputed successfully.\r
+                                HandleBufferLength is updated with the actual length.\r
+  @retval EFI_OUT_OF_RESOURCES  Not enough resource to complete the operation.\r
+  @retval EFI_NOT_FOUND         No matching handle could not be found in database.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 HiiLibListPackageLists (\r
   IN        UINT8                     PackageType,\r
   IN CONST  EFI_GUID                  *PackageGuid,\r
-  IN OUT    UINTN                     *HandleBufferLength,\r
+  OUT    UINTN                        *HandleBufferLength,\r
   OUT       EFI_HII_HANDLE            **HandleBuffer\r
   )\r
 {\r
@@ -591,6 +627,12 @@ HiiLibListPackageLists (
   *HandleBufferLength = 0;\r
   *HandleBuffer       = NULL;\r
 \r
+  if (PackageType == EFI_HII_PACKAGE_TYPE_GUID) {\r
+    ASSERT (PackageGuid != NULL);\r
+  } else {\r
+    ASSERT (PackageGuid == NULL);\r
+  }\r
+\r
   Status = mHiiDatabaseProt->ListPackageLists (\r
                             mHiiDatabaseProt,\r
                             PackageType,\r
@@ -600,7 +642,7 @@ HiiLibListPackageLists (
                             );\r
   if (EFI_ERROR (Status) && (Status != EFI_BUFFER_TOO_SMALL)) {\r
     //\r
-    // No packages is registered to UEFI HII Database, just return EFI_SUCCESS.\r
+    // No packages is registered to UEFI HII Database, just return.\r
     // \r
     //\r
     return Status;\r