ShellPkg: BcfgDisplayDump(): print optional data with DumpHex()

The DumpHex() function produces very friendly output (known from DMPSTORE,
for example); let's use it with "BCFG -v" as well.

Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19718 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Laszlo Ersek 2016-01-21 18:40:44 +00:00 committed by lersek
parent 3bd8960362
commit 2de293cd96
1 changed files with 7 additions and 14 deletions

View File

@ -1048,7 +1048,6 @@ BcfgDisplayDump(
UINTN BufferSize; UINTN BufferSize;
CHAR16 VariableName[12]; CHAR16 VariableName[12];
UINTN LoopVar; UINTN LoopVar;
UINTN LoopVar2;
CHAR16 *DevPathString; CHAR16 *DevPathString;
VOID *FilePathList; VOID *FilePathList;
UINTN Errors; UINTN Errors;
@ -1135,19 +1134,13 @@ BcfgDisplayDump(
DevPathString, DevPathString,
OptionalDataOffset >= BufferSize ? L'N' : L'Y' OptionalDataOffset >= BufferSize ? L'N' : L'Y'
); );
if (VerboseOutput) { if (VerboseOutput && (OptionalDataOffset < BufferSize)) {
for (LoopVar2 = OptionalDataOffset; LoopVar2 < BufferSize; LoopVar2++){ DumpHex (
ShellPrintEx( 2, // Indent
-1, 0, // Offset (displayed)
-1, BufferSize - OptionalDataOffset, // DataSize
L"%02x", Buffer + OptionalDataOffset // UserData
Buffer[LoopVar2]); );
}
ShellPrintEx(
-1,
-1,
NULL,
L"\r\n");
} }
Cleanup: Cleanup: