X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkModulePkg%2FUniversal%2FBdsDxe%2FString.c;h=9924352234f65782647af80a00ec56492c9bb2ea;hb=180a5a35cb49699bd249dee19e41cee34c856a58;hp=d1c6651977054658105b8d8eed6be7a0d525e9f3;hpb=5c08e1173703234cc2913757f237ee916087498a;p=mirror_edk2.git diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/String.c b/IntelFrameworkModulePkg/Universal/BdsDxe/String.c index d1c6651977..9924352234 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/String.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/String.c @@ -1,8 +1,8 @@ /** @file String support -Copyright (c) 2004 - 2008, Intel Corporation.
-All rights reserved. This program and the accompanying materials +Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -23,45 +23,21 @@ EFI_GUID mBdsStringPackGuid = { }; /** - Initialize HII global accessor for string support - - @retval EFI_SUCCESS String support initialize success. + Initialize HII global accessor for string support. **/ -EFI_STATUS +VOID InitializeStringSupport ( VOID ) { - EFI_STATUS Status; - EFI_HANDLE DriverHandle; - EFI_HII_PACKAGE_LIST_HEADER *PackageList; - - Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase); - if (EFI_ERROR (Status)) { - return Status; - } - - // - // Create driver handle used by HII database - // - Status = HiiLibCreateHiiDriverHandle (&DriverHandle); - if (EFI_ERROR (Status)) { - return Status; - } - - PackageList = HiiLibPreparePackageList (1, &mBdsStringPackGuid, &BdsDxeStrings); - ASSERT (PackageList != NULL); - - Status = gHiiDatabase->NewPackageList ( - gHiiDatabase, - PackageList, - DriverHandle, - &gStringPackHandle - ); - - FreePool (PackageList); - return Status; + gStringPackHandle = HiiAddPackages ( + &mBdsStringPackGuid, + mBdsImageHandle, + BdsDxeStrings, + NULL + ); + ASSERT (gStringPackHandle != NULL); } /** @@ -79,10 +55,5 @@ GetStringById ( IN EFI_STRING_ID Id ) { - CHAR16 *String; - - String = NULL; - HiiLibGetStringFromHandle (gStringPackHandle, Id, &String); - - return String; + return HiiGetString (gStringPackHandle, Id, NULL); }