X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellBcfgCommandLib%2FUefiShellBcfgCommandLib.c;h=36d04d495c69c29b5f6fb3f6de3e06ff9f2a0023;hb=8f2c09f8b2a8708db49e42bcac4cdfbccfa817d8;hp=f5ae7bc0d9de6fdd7d9cfada2a6215d704323b07;hpb=43da602cb4e14efa921a359afb9c4c06c7138eba;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c index f5ae7bc0d9..36d04d495c 100644 --- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c +++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c @@ -1051,12 +1051,15 @@ BcfgDisplayDump( UINTN LoopVar2; CHAR16 *DevPathString; VOID *DevPath; + UINTN Errors; if (OrderCount == 0) { ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg"); return (SHELL_SUCCESS); } + Errors = 0; + for (LoopVar = 0 ; LoopVar < OrderCount ; LoopVar++) { Buffer = NULL; BufferSize = 0; @@ -1083,7 +1086,8 @@ BcfgDisplayDump( if (EFI_ERROR(Status) || Buffer == NULL) { ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_READ_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName); - return (SHELL_INVALID_PARAMETER); + ++Errors; + goto Cleanup; } if ((*(UINT16*)(Buffer+4)) != 0) { @@ -1120,6 +1124,7 @@ BcfgDisplayDump( L"\r\n"); } +Cleanup: if (Buffer != NULL) { FreePool(Buffer); } @@ -1130,7 +1135,7 @@ BcfgDisplayDump( FreePool(DevPathString); } } - return (SHELL_SUCCESS); + return (Errors > 0) ? SHELL_INVALID_PARAMETER : SHELL_SUCCESS; } /**