summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-31 14:14:44 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-08-31 14:14:44 +0000
commit33bb6326576a3f4f722b60d8a8d996af882009d1 (patch)
tree3e010dc7cce6a557272ad91db4c1f426e8b5b2ec /IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
parentab8cc80b8ae9f0f4443aa06dd66de0fa8f49ec2c (diff)
downloadedk2-platforms-33bb6326576a3f4f722b60d8a8d996af882009d1.tar.xz
Update BdsDxe to use HiiLib and UefiHiiServicesLib APIs to eliminate the symbol collision.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9210 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
index 55fce979f7..37be6ff976 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
@@ -21,10 +21,7 @@ EFI_GUID mFrontPageGuid = FRONT_PAGE_FORMSET_GUID;
BOOLEAN gConnectAllHappened = FALSE;
UINTN gCallbackKey;
-EFI_HII_DATABASE_PROTOCOL *gHiiDatabase;
-EFI_HII_STRING_PROTOCOL *gHiiString;
EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
-EFI_HII_CONFIG_ROUTING_PROTOCOL *gHiiConfigRouting;
FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate = {
FRONT_PAGE_CALLBACK_DATA_SIGNATURE,
@@ -306,7 +303,6 @@ InitializeFrontPage (
CHAR8 *BestLanguage;
UINTN OptionCount;
CHAR16 *StringBuffer;
- UINTN BufferSize;
EFI_HII_HANDLE HiiHandle;
VOID *OptionsOpCodeHandle;
VOID *StartOpCodeHandle;
@@ -331,26 +327,11 @@ InitializeFrontPage (
//
// Locate Hii relative protocols
//
- Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gHiiString);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFormBrowser2);
if (EFI_ERROR (Status)) {
return Status;
}
- Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **) &gHiiConfigRouting);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
//
// Install Device Path Protocol and Config Access protocol to driver handle
//
@@ -454,35 +435,8 @@ InitializeFrontPage (
GetNextLanguage (&LangCode, Lang);
if (FirstFlag) {
- //
- // Get Language Name from String Package. The StringId of Printable Language
- // Name is always 1 which is generated by StringGather Tool.
- //
- BufferSize = 0x100;
- StringBuffer = AllocatePool (BufferSize);
- Status = gHiiString->GetString (
- gHiiString,
- Lang,
- HiiHandle,
- PRINTABLE_LANGUAGE_NAME_STRING_ID,
- StringBuffer,
- &BufferSize,
- NULL
- );
- if (Status == EFI_BUFFER_TOO_SMALL) {
- FreePool (StringBuffer);
- StringBuffer = AllocatePool (BufferSize);
- Status = gHiiString->GetString (
- gHiiString,
- Lang,
- HiiHandle,
- PRINTABLE_LANGUAGE_NAME_STRING_ID,
- StringBuffer,
- &BufferSize,
- NULL
- );
- }
- ASSERT_EFI_ERROR (Status);
+ StringBuffer = HiiGetString (HiiHandle, PRINTABLE_LANGUAGE_NAME_STRING_ID, Lang);
+ ASSERT_EFI_ERROR (StringBuffer != NULL);
//
// Save the string Id for each language