]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/BdsDxe/String.c
IntelFrameworkModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / String.c
1 /** @file
2 String support
3
4 Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include "Bds.h"
10 #include "Language.h"
11 #include "FrontPage.h"
12
13 EFI_HII_HANDLE gStringPackHandle;
14
15 EFI_GUID mBdsStringPackGuid = {
16 0x7bac95d3, 0xddf, 0x42f3, {0x9e, 0x24, 0x7c, 0x64, 0x49, 0x40, 0x37, 0x9a}
17 };
18
19 /**
20 Initialize HII global accessor for string support.
21
22 **/
23 VOID
24 InitializeStringSupport (
25 VOID
26 )
27 {
28 gStringPackHandle = HiiAddPackages (
29 &mBdsStringPackGuid,
30 gImageHandle,
31 BdsDxeStrings,
32 NULL
33 );
34 ASSERT (gStringPackHandle != NULL);
35 }
36
37 /**
38 Get string by string id from HII Interface
39
40
41 @param Id String ID.
42
43 @retval CHAR16 * String from ID.
44 @retval NULL If error occurs.
45
46 **/
47 CHAR16 *
48 GetStringById (
49 IN EFI_STRING_ID Id
50 )
51 {
52 return HiiGetString (gStringPackHandle, Id, NULL);
53 }