mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix ICC11 build failure.
Eliminate SHELL_STATUS and EFI_STATUS mismatch. Signed-off-by: jcarsey Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13075 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
81c0d6e9a7
commit
50b43b1506
|
@ -934,33 +934,37 @@ BcfgAddOptDebug1(
|
||||||
//
|
//
|
||||||
// Open the file and populate the data buffer.
|
// Open the file and populate the data buffer.
|
||||||
//
|
//
|
||||||
ShellStatus = ShellOpenFileByName(
|
Status = ShellOpenFileByName(
|
||||||
FileName,
|
FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_READ,
|
EFI_FILE_MODE_READ,
|
||||||
0);
|
0);
|
||||||
if (ShellStatus == SHELL_SUCCESS) {
|
if (!EFI_ERROR(Status)) {
|
||||||
ShellStatus = ShellGetFileSize(FileHandle, &Intermediate);
|
Status = ShellGetFileSize(FileHandle, &Intermediate);
|
||||||
}
|
}
|
||||||
Data = AllocateZeroPool((UINTN)Intermediate);
|
Data = AllocateZeroPool((UINTN)Intermediate);
|
||||||
if (Data == NULL) {
|
if (Data == NULL) {
|
||||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellDebug1HiiHandle);
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellDebug1HiiHandle);
|
||||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
if (ShellStatus == SHELL_SUCCESS) {
|
if (!EFI_ERROR(Status)) {
|
||||||
ShellStatus = ShellReadFile(FileHandle, (UINTN *)&Intermediate, Data);
|
Status = ShellReadFile(FileHandle, (UINTN *)&Intermediate, Data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Intermediate = StrSize(Data);
|
Intermediate = StrSize(Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShellStatus == SHELL_SUCCESS && Data != NULL) {
|
if (!EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS && Data != NULL) {
|
||||||
Status = UpdateOptionalDataDebug1(CurrentOrder[OptionIndex], (UINTN)Intermediate, (UINT8*)Data, Target);
|
Status = UpdateOptionalDataDebug1(CurrentOrder[OptionIndex], (UINTN)Intermediate, (UINT8*)Data, Target);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellDebug1HiiHandle, VariableName, Status);
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellDebug1HiiHandle, VariableName, Status);
|
||||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) {
|
||||||
|
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellDebug1HiiHandle, VariableName, Status);
|
||||||
|
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SHELL_FREE_NON_NULL(Data);
|
SHELL_FREE_NON_NULL(Data);
|
||||||
|
|
Loading…
Reference in New Issue