/** @file\r
Language settings\r
\r
-Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
// The default language code should be one of the supported language codes.\r
//\r
ASSERT (IsLangInSupportedLangCodes (SupportedLang, DefaultLang, Iso639Language));\r
- Status = gRT->SetVariable (\r
+ BdsDxeSetVariableAndReportStatusCodeOnError (\r
LangName,\r
&gEfiGlobalVariableGuid,\r
EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
AsciiStrSize (LangCodes),\r
LangCodes\r
);\r
+ //\r
+ // Platform needs to make sure setting volatile variable before calling 3rd party code shouldn't fail.\r
+ //\r
+ ASSERT_EFI_ERROR (Status);\r
}\r
\r
Status = gRT->SetVariable (\r
AsciiStrSize (PlatformLangCodes),\r
PlatformLangCodes\r
);\r
+ //\r
+ // Platform needs to make sure setting volatile variable before calling 3rd party code shouldn't fail.\r
+ //\r
+ ASSERT_EFI_ERROR (Status);\r
}\r
\r
if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) {\r