From 0e7bfce8d0dc29695d0eb141f16e7976abcc5486 Mon Sep 17 00:00:00 2001 From: xli24 Date: Thu, 11 Jan 2007 06:37:39 +0000 Subject: 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 --- EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c') diff --git a/EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c b/EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c index 6a3a34e2c9..56292f9e47 100644 --- a/EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c +++ b/EdkUnixPkg/Dxe/PlatformBds/Generic/FrontPage.c @@ -485,15 +485,16 @@ Returns: UINT16 Length; EFI_GUID HiiGuid; - HandleBufferLength = 0x1000; + // + // Initialize params. + // + HandleBufferLength = 0; HiiHandleBuffer = NULL; // // Get all the Hii handles // - HiiHandleBuffer = AllocateZeroPool (HandleBufferLength); - - Status = Hii->FindHandles (Hii, &HandleBufferLength, HiiHandleBuffer); + Status = BdsLibGetHiiHandles (Hii, &HandleBufferLength, &HiiHandleBuffer); ASSERT_EFI_ERROR (Status); // -- cgit v1.2.3