Revision: 19718
          http://sourceforge.net/p/edk2/code/19718
Author:   lersek
Date:     2016-01-21 18:40:44 +0000 (Thu, 21 Jan 2016)
Log Message:
-----------
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 <[email protected]>
Cc: Ryan Harkin <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>

Modified Paths:
--------------
    
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c

Modified: 
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
===================================================================
--- 
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c   
    2016-01-21 18:40:40 UTC (rev 19717)
+++ 
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c   
    2016-01-21 18:40:44 UTC (rev 19718)
@@ -1048,7 +1048,6 @@
   UINTN           BufferSize;
   CHAR16          VariableName[12];
   UINTN           LoopVar;
-  UINTN           LoopVar2;
   CHAR16          *DevPathString;
   VOID            *FilePathList;
   UINTN           Errors;
@@ -1135,19 +1134,13 @@
       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:


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to