mirror of https://github.com/acidanthera/audk.git
Fixed build failed.
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13406 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
d5b339a9e7
commit
f01b91ae42
|
@ -349,7 +349,7 @@ HiiThunkGetString (
|
||||||
//
|
//
|
||||||
// Get the current platform language setting
|
// Get the current platform language setting
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &PlatformLanguage, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the best matching language from SupportedLanguages
|
// Get the best matching language from SupportedLanguages
|
||||||
|
|
|
@ -1513,8 +1513,8 @@ BdsLibEnumerateAllBootOption (
|
||||||
// device from the boot order variable
|
// device from the boot order variable
|
||||||
//
|
//
|
||||||
if (mEnumBootDevice) {
|
if (mEnumBootDevice) {
|
||||||
GetVariable2 (LAST_ENUM_LANGUAGE_VARIABLE_NAME, &gLastEnumLangGuid, &LastLang, NULL);
|
GetVariable2 (LAST_ENUM_LANGUAGE_VARIABLE_NAME, &gLastEnumLangGuid, (VOID**)&LastLang, NULL);
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &PlatLang, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatLang, NULL);
|
||||||
ASSERT (PlatLang != NULL);
|
ASSERT (PlatLang != NULL);
|
||||||
if ((LastLang != NULL) && (AsciiStrCmp (LastLang, PlatLang) == 0)) {
|
if ((LastLang != NULL) && (AsciiStrCmp (LastLang, PlatLang) == 0)) {
|
||||||
Status = BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder");
|
Status = BdsLibBuildOptionFromVar (BdsBootOptionList, L"BootOrder");
|
||||||
|
|
|
@ -2167,7 +2167,7 @@ DriverHealthSelectBestLanguage (
|
||||||
CHAR8 *LanguageVariable;
|
CHAR8 *LanguageVariable;
|
||||||
CHAR8 *BestLanguage;
|
CHAR8 *BestLanguage;
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang", &LanguageVariable, NULL);
|
GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang", (VOID**)&LanguageVariable, NULL);
|
||||||
|
|
||||||
BestLanguage = GetBestLanguage(
|
BestLanguage = GetBestLanguage(
|
||||||
SupportedLanguages,
|
SupportedLanguages,
|
||||||
|
|
|
@ -232,7 +232,7 @@ FrontPageCallback (
|
||||||
Index++;
|
Index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (L"PlatformLangCodes", &PlatformSupportedLanguages, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLangCodes", (VOID**)&PlatformSupportedLanguages, NULL);
|
||||||
if (PlatformSupportedLanguages == NULL) {
|
if (PlatformSupportedLanguages == NULL) {
|
||||||
PlatformSupportedLanguages = AllocateCopyPool (
|
PlatformSupportedLanguages = AllocateCopyPool (
|
||||||
AsciiStrSize ((CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
|
AsciiStrSize ((CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLangCodes)),
|
||||||
|
@ -430,7 +430,7 @@ InitializeFrontPage (
|
||||||
Lang = AllocatePool (AsciiStrSize (LanguageString));
|
Lang = AllocatePool (AsciiStrSize (LanguageString));
|
||||||
ASSERT (Lang != NULL);
|
ASSERT (Lang != NULL);
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLang, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLang, NULL);
|
||||||
//
|
//
|
||||||
// Select the best language in LanguageString as the default one.
|
// Select the best language in LanguageString as the default one.
|
||||||
//
|
//
|
||||||
|
|
|
@ -250,7 +250,7 @@ HiiGetString (
|
||||||
//
|
//
|
||||||
// Get the current platform language setting
|
// Get the current platform language setting
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &PlatformLanguage, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// If Languag is NULL, then set it to an empty string, so it will be
|
// If Languag is NULL, then set it to an empty string, so it will be
|
||||||
|
|
|
@ -358,7 +358,7 @@ IsTerminalInConsoleVariable (
|
||||||
//
|
//
|
||||||
// Get global variable and its size according to the name given.
|
// Get global variable and its size according to the name given.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (VariableName, &Variable, NULL);
|
GetEfiGlobalVariable2 (VariableName, (VOID**)&Variable, NULL);
|
||||||
if (Variable == NULL) {
|
if (Variable == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1431,7 +1431,7 @@ TerminalUpdateConsoleDevVariable (
|
||||||
//
|
//
|
||||||
// Get global variable and its size according to the name given.
|
// Get global variable and its size according to the name given.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (VariableName, &Variable, NULL);
|
GetEfiGlobalVariable2 (VariableName, (VOID**)&Variable, NULL);
|
||||||
if (Variable == NULL) {
|
if (Variable == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1500,7 +1500,7 @@ TerminalRemoveConsoleDevVariable (
|
||||||
//
|
//
|
||||||
// Get global variable and its size according to the name given.
|
// Get global variable and its size according to the name given.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (VariableName, &Variable, NULL);
|
GetEfiGlobalVariable2 (VariableName, (VOID**)&Variable, NULL);
|
||||||
if (Variable == NULL) {
|
if (Variable == NULL) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2368,7 +2368,7 @@ HiiStringIdToImage (
|
||||||
if (Language == NULL) {
|
if (Language == NULL) {
|
||||||
Language = "";
|
Language = "";
|
||||||
}
|
}
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLanguage, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLanguage, NULL);
|
||||||
BestLanguage = GetBestLanguage (
|
BestLanguage = GetBestLanguage (
|
||||||
SupportedLanguages,
|
SupportedLanguages,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
|
|
@ -91,7 +91,7 @@ Ip4ConfigReadVariable (
|
||||||
{
|
{
|
||||||
NIC_IP4_CONFIG_INFO *NicConfig;
|
NIC_IP4_CONFIG_INFO *NicConfig;
|
||||||
|
|
||||||
GetVariable2 (Instance->MacString, &gEfiNicIp4ConfigVariableGuid, &NicConfig, NULL);
|
GetVariable2 (Instance->MacString, &gEfiNicIp4ConfigVariableGuid, (VOID**)&NicConfig, NULL);
|
||||||
if (NicConfig != NULL) {
|
if (NicConfig != NULL) {
|
||||||
Ip4ConfigFixRouteTablePointer (&NicConfig->Ip4Info);
|
Ip4ConfigFixRouteTablePointer (&NicConfig->Ip4Info);
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ Check:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetVariable2 (VariableName, &gEfiNicIp4ConfigVariableGuid, &NicConfig, NULL);
|
GetVariable2 (VariableName, &gEfiNicIp4ConfigVariableGuid, (VOID**)&NicConfig, NULL);
|
||||||
if (NicConfig == NULL) {
|
if (NicConfig == NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ GetComponentNameWorker (
|
||||||
//
|
//
|
||||||
// Find the best matching language.
|
// Find the best matching language.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (VariableName, &Language, NULL);
|
GetEfiGlobalVariable2 (VariableName, (VOID**)&Language, NULL);
|
||||||
BestLanguage = GetBestLanguage (
|
BestLanguage = GetBestLanguage (
|
||||||
ComponentName->SupportedLanguages,
|
ComponentName->SupportedLanguages,
|
||||||
(BOOLEAN) (ProtocolGuid == &gEfiComponentNameProtocolGuid),
|
(BOOLEAN) (ProtocolGuid == &gEfiComponentNameProtocolGuid),
|
||||||
|
|
|
@ -41,7 +41,7 @@ Dhcp6GenerateClientId (
|
||||||
// Attempt to get client Id from variable to keep it constant.
|
// Attempt to get client Id from variable to keep it constant.
|
||||||
// See details in section-9 of rfc-3315.
|
// See details in section-9 of rfc-3315.
|
||||||
//
|
//
|
||||||
GetVariable2 (L"ClientId", &gEfiDhcp6ServiceBindingProtocolGuid, &Duid, NULL);
|
GetVariable2 (L"ClientId", &gEfiDhcp6ServiceBindingProtocolGuid, (VOID**)&Duid, NULL);
|
||||||
if (Duid != NULL) {
|
if (Duid != NULL) {
|
||||||
return Duid;
|
return Duid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1079,7 +1079,7 @@ IScsiGetConfigData (
|
||||||
GetVariable2 (
|
GetVariable2 (
|
||||||
mPrivate->PortString,
|
mPrivate->PortString,
|
||||||
&gEfiIScsiInitiatorNameProtocolGuid,
|
&gEfiIScsiInitiatorNameProtocolGuid,
|
||||||
&AttemptConfigData,
|
(VOID**)&AttemptConfigData,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ CurrentLanguageMatch (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLang, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLang, NULL);
|
||||||
DefaultLang = (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang);
|
DefaultLang = (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang);
|
||||||
BestLanguage = GetBestLanguage (
|
BestLanguage = GetBestLanguage (
|
||||||
Languages,
|
Languages,
|
||||||
|
|
|
@ -270,7 +270,7 @@ GetNameFromHandle (
|
||||||
//
|
//
|
||||||
// Get the current platform language setting
|
// Get the current platform language setting
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &PlatformLanguage, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL);
|
||||||
Status = ComponentName2->GetDriverName (
|
Status = ComponentName2->GetDriverName (
|
||||||
ComponentName2,
|
ComponentName2,
|
||||||
PlatformLanguage != NULL ? PlatformLanguage : "en-US",
|
PlatformLanguage != NULL ? PlatformLanguage : "en-US",
|
||||||
|
|
|
@ -532,7 +532,7 @@ IsBootOption (
|
||||||
// Try to find the DevicePath in BootOption
|
// Try to find the DevicePath in BootOption
|
||||||
//
|
//
|
||||||
UnicodeSPrint (StrTemp, sizeof (StrTemp), L"Boot%04x", Index);
|
UnicodeSPrint (StrTemp, sizeof (StrTemp), L"Boot%04x", Index);
|
||||||
GetEfiGlobalVariable2 (StrTemp, &OptionBuffer, NULL);
|
GetEfiGlobalVariable2 (StrTemp, (VOID**)&OptionBuffer, NULL);
|
||||||
if (OptionBuffer == NULL) {
|
if (OptionBuffer == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1065,7 +1065,7 @@ VerifyCertUefiGuid (
|
||||||
//
|
//
|
||||||
// Get KEK database variable.
|
// Get KEK database variable.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (EFI_KEY_EXCHANGE_KEY_NAME, &KekList, NULL);
|
GetEfiGlobalVariable2 (EFI_KEY_EXCHANGE_KEY_NAME, (VOID**)&KekList, NULL);
|
||||||
if (KekList == NULL) {
|
if (KekList == NULL) {
|
||||||
return EFI_SECURITY_VIOLATION;
|
return EFI_SECURITY_VIOLATION;
|
||||||
}
|
}
|
||||||
|
@ -1260,7 +1260,7 @@ DxeImageVerificationHandler (
|
||||||
return EFI_ACCESS_DENIED;
|
return EFI_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, &SecureBootEnable, NULL);
|
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||||
//
|
//
|
||||||
// Skip verification if SecureBootEnable variable doesn't exist.
|
// Skip verification if SecureBootEnable variable doesn't exist.
|
||||||
//
|
//
|
||||||
|
@ -1278,7 +1278,7 @@ DxeImageVerificationHandler (
|
||||||
|
|
||||||
FreePool (SecureBootEnable);
|
FreePool (SecureBootEnable);
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (EFI_SETUP_MODE_NAME, &SetupMode, NULL);
|
GetEfiGlobalVariable2 (EFI_SETUP_MODE_NAME, (VOID**)&SetupMode, NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// SetupMode doesn't exist means no AuthVar driver is dispatched,
|
// SetupMode doesn't exist means no AuthVar driver is dispatched,
|
||||||
|
@ -1544,7 +1544,7 @@ VariableWriteCallBack (
|
||||||
// If this library is built-in, it means firmware has capability to perform
|
// If this library is built-in, it means firmware has capability to perform
|
||||||
// driver signing verification.
|
// driver signing verification.
|
||||||
//
|
//
|
||||||
GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, &SecureBootModePtr, NULL);
|
GetEfiGlobalVariable2 (EFI_SECURE_BOOT_MODE_NAME, (VOID**)&SecureBootModePtr, NULL);
|
||||||
if (SecureBootModePtr == NULL) {
|
if (SecureBootModePtr == NULL) {
|
||||||
SecureBootMode = SECURE_BOOT_MODE_DISABLE;
|
SecureBootMode = SECURE_BOOT_MODE_DISABLE;
|
||||||
//
|
//
|
||||||
|
|
|
@ -410,7 +410,7 @@ DisplayLoadPermit(
|
||||||
// Get driver device path.
|
// Get driver device path.
|
||||||
//
|
//
|
||||||
UnicodeSPrint (VarName, sizeof (VarName), L"Driver%04x", Order[Index]);
|
UnicodeSPrint (VarName, sizeof (VarName), L"Driver%04x", Order[Index]);
|
||||||
GetEfiGlobalVariable2 (VarName, &Var, NULL);
|
GetEfiGlobalVariable2 (VarName, (VOID**)&Var, NULL);
|
||||||
if (Var == NULL) {
|
if (Var == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -655,7 +655,7 @@ AddToForbidLoad (
|
||||||
// Get loadable driver device path.
|
// Get loadable driver device path.
|
||||||
//
|
//
|
||||||
UnicodeSPrint (VarName, sizeof (VarName), L"Driver%04x", DriverIndex);
|
UnicodeSPrint (VarName, sizeof (VarName), L"Driver%04x", DriverIndex);
|
||||||
GetEfiGlobalVariable2 (VarName, &Var, NULL);
|
GetEfiGlobalVariable2 (VarName, (VOID**)&Var, NULL);
|
||||||
if (Var == NULL) {
|
if (Var == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2064,7 +2064,7 @@ SecureBootExtractConfigFromVariable (
|
||||||
//
|
//
|
||||||
// Get the SecureBootEnable Variable
|
// Get the SecureBootEnable Variable
|
||||||
//
|
//
|
||||||
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, &SecureBootEnable, NULL);
|
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the SecureBootEnable Variable doesn't exist, hide the SecureBoot Enable/Disable
|
// If the SecureBootEnable Variable doesn't exist, hide the SecureBoot Enable/Disable
|
||||||
|
@ -2088,7 +2088,7 @@ SecureBootExtractConfigFromVariable (
|
||||||
//
|
//
|
||||||
// If there is no PK then the Delete Pk button will be gray.
|
// If there is no PK then the Delete Pk button will be gray.
|
||||||
//
|
//
|
||||||
GetVariable2 (EFI_SETUP_MODE_NAME, &gEfiGlobalVariableGuid, &SetupMode, NULL);
|
GetVariable2 (EFI_SETUP_MODE_NAME, &gEfiGlobalVariableGuid, (VOID**)&SetupMode, NULL);
|
||||||
if (SetupMode == NULL || (*SetupMode) == 1) {
|
if (SetupMode == NULL || (*SetupMode) == 1) {
|
||||||
ConfigData->HasPk = FALSE;
|
ConfigData->HasPk = FALSE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2098,7 +2098,7 @@ SecureBootExtractConfigFromVariable (
|
||||||
//
|
//
|
||||||
// Get the SecureBootMode from CustomMode variable.
|
// Get the SecureBootMode from CustomMode variable.
|
||||||
//
|
//
|
||||||
GetVariable2 (EFI_CUSTOM_MODE_NAME, &gEfiCustomModeEnableGuid, &SecureBootMode, NULL);
|
GetVariable2 (EFI_CUSTOM_MODE_NAME, &gEfiCustomModeEnableGuid, (VOID**)&SecureBootMode, NULL);
|
||||||
if (SecureBootMode == NULL) {
|
if (SecureBootMode == NULL) {
|
||||||
ConfigData->SecureBootMode = STANDARD_SECURE_BOOT_MODE;
|
ConfigData->SecureBootMode = STANDARD_SECURE_BOOT_MODE;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2329,7 +2329,7 @@ SecureBootCallback (
|
||||||
|
|
||||||
switch (QuestionId) {
|
switch (QuestionId) {
|
||||||
case KEY_SECURE_BOOT_ENABLE:
|
case KEY_SECURE_BOOT_ENABLE:
|
||||||
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, &SecureBootEnable, NULL);
|
GetVariable2 (EFI_SECURE_BOOT_ENABLE_NAME, &gEfiSecureBootEnableDisableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||||
if (NULL != SecureBootEnable) {
|
if (NULL != SecureBootEnable) {
|
||||||
if (EFI_ERROR (SaveSecureBootVariable (Value->u8))) {
|
if (EFI_ERROR (SaveSecureBootVariable (Value->u8))) {
|
||||||
CreatePopUp (
|
CreatePopUp (
|
||||||
|
@ -2517,7 +2517,7 @@ SecureBootCallback (
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KEY_SECURE_BOOT_MODE:
|
case KEY_SECURE_BOOT_MODE:
|
||||||
GetVariable2 (EFI_CUSTOM_MODE_NAME, &gEfiCustomModeEnableGuid, &SecureBootEnable, NULL);
|
GetVariable2 (EFI_CUSTOM_MODE_NAME, &gEfiCustomModeEnableGuid, (VOID**)&SecureBootEnable, NULL);
|
||||||
if (NULL != SecureBootEnable) {
|
if (NULL != SecureBootEnable) {
|
||||||
Status = gRT->SetVariable (
|
Status = gRT->SetVariable (
|
||||||
EFI_CUSTOM_MODE_NAME,
|
EFI_CUSTOM_MODE_NAME,
|
||||||
|
|
|
@ -45,7 +45,7 @@ CurrentLanguageMatch (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLang, NULL);
|
GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLang, NULL);
|
||||||
DefaultLang = (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang);
|
DefaultLang = (CHAR8 *) PcdGetPtr (PcdUefiVariableDefaultPlatformLang);
|
||||||
BestLanguage = GetBestLanguage (
|
BestLanguage = GetBestLanguage (
|
||||||
Languages,
|
Languages,
|
||||||
|
|
Loading…
Reference in New Issue