]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkUnixPkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
BDS code calls Hii->FindHandles() with hardcoded length.
[mirror_edk2.git] / EdkUnixPkg / Dxe / PlatformBds / Generic / BootMaint / BmLib.c
index 415321efd7898156222753683c952dd71fd6d07f..e9245d2fb62a38af9d4c43a749bca320546d610f 100644 (file)
@@ -464,8 +464,12 @@ Returns:
   EFI_GUID          HiiGuid;\r
   EFI_HII_PROTOCOL  *Hii;\r
 \r
-  HandleBufferLength  = 0x1000;\r
+  //\r
+  // Initialize params.\r
+  //\r
+  HandleBufferLength  = 0;\r
   HiiHandleBuffer     = NULL;\r
+  \r
   Status = gBS->LocateProtocol (\r
                   &gEfiHiiProtocolGuid,\r
                   NULL,\r
@@ -478,12 +482,9 @@ Returns:
   //\r
   // Get all the Hii handles\r
   //\r
-  HiiHandleBuffer = AllocateZeroPool (HandleBufferLength);\r
-  ASSERT (HiiHandleBuffer != NULL);\r
-\r
-  Status = Hii->FindHandles (Hii, &HandleBufferLength, HiiHandleBuffer);\r
+  Status = BdsLibGetHiiHandles (Hii, &HandleBufferLength, &HiiHandleBuffer);\r
   ASSERT_EFI_ERROR (Status);\r
-\r
+  \r
   //\r
   // Get the Hii Handle that matches the StructureNode->ProducerName\r
   //\r