summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-11 06:37:39 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-11 06:37:39 +0000
commit0e7bfce8d0dc29695d0eb141f16e7976abcc5486 (patch)
tree95fe6aa7b9b40994b538b451f0c3a4fe16d0a6b4 /EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
parentc271c1326b7aacf837a75407233da97d6caada34 (diff)
downloadedk2-platforms-0e7bfce8d0dc29695d0eb141f16e7976abcc5486.tar.xz
BDS code calls Hii->FindHandles() with hardcoded length.
New code provides function BdsLibGetHiiHandles() in generic BDS library, which detects actual necessary memory, allocates memory, and finds handles as output. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2216 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c')
-rw-r--r--EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
index 6f46386621..b4f6d481ce 100644
--- a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
+++ b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/BmLib.c
@@ -464,8 +464,12 @@ Returns:
EFI_GUID HiiGuid;
EFI_HII_PROTOCOL *Hii;
- HandleBufferLength = 0x1000;
+ //
+ // Initialize params.
+ //
+ HandleBufferLength = 0;
HiiHandleBuffer = NULL;
+
Status = gBS->LocateProtocol (
&gEfiHiiProtocolGuid,
NULL,
@@ -478,12 +482,9 @@ Returns:
//
// Get all the Hii handles
//
- HiiHandleBuffer = AllocateZeroPool (HandleBufferLength);
- ASSERT (HiiHandleBuffer != NULL);
-
- Status = Hii->FindHandles (Hii, &HandleBufferLength, HiiHandleBuffer);
+ Status = BdsLibGetHiiHandles (Hii, &HandleBufferLength, &HiiHandleBuffer);
ASSERT_EFI_ERROR (Status);
-
+
//
// Get the Hii Handle that matches the StructureNode->ProducerName
//