diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-01-21 18:40:44 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2016-01-21 18:40:44 +0000 |
commit | 2de293cd96294c314999e6935b46d6d12d2091f9 (patch) | |
tree | a906b5ac0386035ea26d42632f29f1fc5aecc275 /ShellPkg/Library | |
parent | 3bd89603625eb451b166ee64676c2b31818d1a1f (diff) | |
download | edk2-platforms-2de293cd96294c314999e6935b46d6d12d2091f9.tar.xz |
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
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c index 64e427029b..6a078d81cc 100644 --- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c +++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c @@ -1048,7 +1048,6 @@ BcfgDisplayDump( UINTN BufferSize;
CHAR16 VariableName[12];
UINTN LoopVar;
- UINTN LoopVar2;
CHAR16 *DevPathString;
VOID *FilePathList;
UINTN Errors;
@@ -1135,19 +1134,13 @@ BcfgDisplayDump( DevPathString,
OptionalDataOffset >= BufferSize ? L'N' : L'Y'
);
- if (VerboseOutput) {
- for (LoopVar2 = OptionalDataOffset; LoopVar2 < BufferSize; LoopVar2++){
- ShellPrintEx(
- -1,
- -1,
- L"%02x",
- Buffer[LoopVar2]);
- }
- ShellPrintEx(
- -1,
- -1,
- NULL,
- L"\r\n");
+ if (VerboseOutput && (OptionalDataOffset < BufferSize)) {
+ DumpHex (
+ 2, // Indent
+ 0, // Offset (displayed)
+ BufferSize - OptionalDataOffset, // DataSize
+ Buffer + OptionalDataOffset // UserData
+ );
}
Cleanup:
|