mirror of https://github.com/acidanthera/audk.git
Use Feature Flag PCD to PcdUefiVariableDefaultLangDepricate to replace LANG_SUPPORT.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5269 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2d81bfb983
commit
d6c0ec55e8
|
@ -139,9 +139,7 @@ FrontPageCallback (
|
|||
CHAR8 *LanguageString;
|
||||
CHAR8 *LangCode;
|
||||
CHAR8 Lang[RFC_3066_ENTRY_SIZE];
|
||||
#ifdef LANG_SUPPORT
|
||||
CHAR8 OldLang[ISO_639_2_ENTRY_SIZE];
|
||||
#endif
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
@ -190,21 +188,21 @@ FrontPageCallback (
|
|||
Lang
|
||||
);
|
||||
|
||||
#ifdef LANG_SUPPORT
|
||||
//
|
||||
// Set UEFI deprecated variable "Lang" for backwards compatibility
|
||||
//
|
||||
Status = ConvertRfc3066LanguageToIso639Language (Lang, OldLang);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = gRT->SetVariable (
|
||||
L"Lang",
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
ISO_639_2_ENTRY_SIZE,
|
||||
OldLang
|
||||
);
|
||||
if (!FeaturePcdGet (PcdUefiVariableDefaultLangDepricate)) {
|
||||
//
|
||||
// Set UEFI deprecated variable "Lang" for backwards compatibility
|
||||
//
|
||||
Status = ConvertRfc3066LanguageToIso639Language (Lang, OldLang);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = gRT->SetVariable (
|
||||
L"Lang",
|
||||
&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
ISO_639_2_ENTRY_SIZE,
|
||||
OldLang
|
||||
);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
FreePool (LanguageString);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue