[edk2] [PATCH 14/14] ShellPkg/dh: Refine the dump output

Ruiyu Ni posted 14 patches 7 years, 3 months ago
[edk2] [PATCH 14/14] ShellPkg/dh: Refine the dump output
Posted by Ruiyu Ni 7 years, 3 months ago
The patch doesn't change any real functionality.
Only the indent width and EOL are changed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
---
 .../UefiHandleParsingLib/UefiHandleParsingLib.c    |   8 +-
 .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | 129 +++++++++++----------
 2 files changed, 69 insertions(+), 68 deletions(-)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 164caa9b91..d12466c7b0 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -497,7 +497,7 @@ EdidDiscoveredProtocolDumpInformation (
     SHELL_FREE_NON_NULL (RetVal);
     RetVal = TempRetVal;
 
-    TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid);
+    TempRetVal = CatSDumpHex (RetVal, 4, 0, EdidDiscovered->SizeOfEdid, EdidDiscovered->Edid);
     RetVal = TempRetVal;
   }
   return RetVal;
@@ -561,7 +561,7 @@ EdidActiveProtocolDumpInformation (
     SHELL_FREE_NON_NULL (RetVal);
     RetVal = TempRetVal;
 
-    TempRetVal = CatSDumpHex (RetVal, 7, 0, EdidActive->SizeOfEdid, EdidActive->Edid);
+    TempRetVal = CatSDumpHex (RetVal, 4, 0, EdidActive->SizeOfEdid, EdidActive->Edid);
     RetVal = TempRetVal;
   }
   return RetVal;
@@ -614,7 +614,7 @@ PciRootBridgeIoDumpInformation(
   if (Temp == NULL) {
     return NULL;
   }
-  Temp2 = CatSPrint(L"\r\n", Temp, PciRootBridgeIo->ParentHandle);
+  Temp2 = CatSPrint(NULL, Temp, PciRootBridgeIo->ParentHandle);
   FreePool(Temp);
   RetVal = Temp2;
   Temp2 = NULL;
@@ -692,7 +692,7 @@ PciRootBridgeIoDumpInformation(
       }
 
       Temp2 = CatSPrint(RetVal,
-        L"%H%02x    %016lx  %016lx  %02x%N\r\n",
+        L"\r\n%%H%02x    %016lx  %016lx  %02x%%N",
         Configuration->SpecificFlag,
         Configuration->AddrRangeMin,
         Configuration->AddrRangeMax,
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index 5d8a0d1bb9..f49ca94623 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -339,71 +339,72 @@
 #string STR_DEBUGSUPPORT_INFO     #language en-US "  Isa = %s"
 #string STR_DEBUGSUPPORT_UNKNOWN  #language en-US "  Unknown (%%H%s%%N)"
 
-#string STR_PCIRB_DUMP_PH         #language en-US "     ParentHandle..: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_SEG        #language en-US "     Segment #.....: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_ATT        #language en-US "     Attributes....: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_SUPPORTS   #language en-US "     Supports......: %H%x%N\r\n"
-#string STR_PCIRB_DUMP_BUS        #language en-US "      BUS : "
-#string STR_PCIRB_DUMP_MEM        #language en-US "      MEM : "
-#string STR_PCIRB_DUMP_IO         #language en-US "      IO  : "
-#string STR_PCIRB_DUMP_TITLE      #language en-US "      Type  Flag  Base              Limit             Gran\r\n"
-                                                  "      ====  ====  ================  ================  ====\r\n"
-#string STR_PCIIO_DUMP_MAIN       #language en-US "     Segment #.....: %02x\r\n"
-                                                  "     Bus #.........: %02x\r\n"
-                                                  "     Device #......: %02x\r\n"
-                                                  "     Function #....: %02x\r\n"
-                                                  "     ROM Size......: %lx\r\n"
-                                                  "     ROM Location..: %08x\r\n"
-                                                  "     Vendor ID.....: %04x\r\n"
-                                                  "     Device ID.....: %04x\r\n"
-                                                  "     Class Code....: %02x %02x %02x\r\n"
-                                                  "     Configuration Header :"
-#string STR_USBIO_DUMP_MAIN       #language en-US "     Interface Number #.....: %02x\r\n"
-                                                  "     Interface Class #......: %02x\r\n"
-                                                  "     Interface Subclass #...: %02x\r\n"
-                                                  "     Interface Protocol #...: %02x"
-
-#string STR_LI_DUMP_NAME          #language en-US "     Name..........: %%H%s%%N\r\n"
-
-#string STR_LI_DUMP_MAIN          #language en-US "     Revision......: %%H0x%08x%%N\r\n"
-                                                  "     ParentHandle..: %%H%x%%N\r\n"
-                                                  "     SystemTable...: %%H%x%%N\r\n"
-                                                  "     DeviceHandle..: %%H%x%%N\r\n"
-                                                  "     FilePath......: %%H%s%%N\r\n"
-                                                  "     PdbFileName...: %%H%a%%N\r\n"
-                                                  "     OptionsSize...: %%H%x%%N\r\n"
-                                                  "     LoadOptions...: %%H%x%%N\r\n"
-                                                  "     ImageBase.....: %%H%x%%N\r\n"
-                                                  "     ImageSize.....: %%H%Lx%%N\r\n"
-                                                  "     CodeType......: %%H%s%%N\r\n"
-                                                  "     DataType......: %%H%s%%N\r\n"
-                                                  "     Unload........: %%H%x%%N"
-
-#string STR_GOP_DUMP_MAIN         #language en-US "     Max Mode..............: %%H0x%08x%%N\r\n"
-                                                  "     Current Mode..........: %%H0x%08x%%N\r\n"
-                                                  "     Frame Buffer Base.....: %%H0x%L016x%%N\r\n"
-                                                  "     Frame Buffer Size.....: %%H0x%L016x%%N\r\n"
-                                                  "     Mode Info Size........: %%H0x%L016x%%N\r\n"
-                                                  "     Information\r\n"
-                                                  "       Version.............: %%H0x%08x%%N\r\n"
-                                                  "       HorizontalResolution: %%H%d%%N\r\n"
-                                                  "       VerticalResolution..: %%H%d%%N\r\n"
-                                                  "       Pixel Format........: %%H%s%%N\r\n"
-                                                  "       Pixels / Scan Line..: %%H%d%%N\r\n"
-                                                  "       Pixel Info\r\n"
-                                                  "         RedMask...........: %%H0x%08x%%N\r\n"
-                                                  "         GreenMask.........: %%H0x%08x%%N\r\n"
-                                                  "         BlueMask..........: %%H0x%08x%%N\r\n"
-
-#string STR_GOP_RES_LIST_MAIN     #language en-US "     Supported Resolution List"
-#string STR_GOP_RES_LIST_ENTRY    #language en-US "\r\n       Resolution[%%H%d%%N]:\r\n"
-                                                  "         Horizontal........: %%H%d%%N\r\n"
-                                                  "         Vertical..........: %%H%d%%N"
+#string STR_PCIRB_DUMP_PH         #language en-US "  ParentHandle..: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_SEG        #language en-US "  Segment #.....: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_ATT        #language en-US "  Attributes....: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_SUPPORTS   #language en-US "  Supports......: %%H%x%%N\r\n"
+#string STR_PCIRB_DUMP_BUS        #language en-US "   BUS : "
+#string STR_PCIRB_DUMP_MEM        #language en-US "   MEM : "
+#string STR_PCIRB_DUMP_IO         #language en-US "   IO  : "
+#string STR_PCIRB_DUMP_TITLE      #language en-US "   Type  Flag  Base              Limit             Gran\r\n"
+                                                  "   ====  ====  ================  ================  ===="
+#string STR_PCIIO_DUMP_MAIN       #language en-US "  Segment #.....: %02x\r\n"
+                                                  "  Bus #.........: %02x\r\n"
+                                                  "  Device #......: %02x\r\n"
+                                                  "  Function #....: %02x\r\n"
+                                                  "  ROM Size......: %lx\r\n"
+                                                  "  ROM Location..: %08x\r\n"
+                                                  "  Vendor ID.....: %04x\r\n"
+                                                  "  Device ID.....: %04x\r\n"
+                                                  "  Class Code....: %02x %02x %02x\r\n"
+                                                  "  Configuration Header :"
+#string STR_USBIO_DUMP_MAIN       #language en-US "  Interface Number #.....: %02x\r\n"
+                                                  "  Interface Class #......: %02x\r\n"
+                                                  "  Interface Subclass #...: %02x\r\n"
+                                                  "  Interface Protocol #...: %02x"
+
+#string STR_LI_DUMP_NAME          #language en-US "  Name..........: %%H%s%%N\r\n"
+
+#string STR_LI_DUMP_MAIN          #language en-US "  Revision......: %%H0x%08x%%N\r\n"
+                                                  "  ParentHandle..: %%H%x%%N\r\n"
+                                                  "  SystemTable...: %%H%x%%N\r\n"
+                                                  "  DeviceHandle..: %%H%x%%N\r\n"
+                                                  "  FilePath......: %%H%s%%N\r\n"
+                                                  "  PdbFileName...: %%H%a%%N\r\n"
+                                                  "  OptionsSize...: %%H%x%%N\r\n"
+                                                  "  LoadOptions...: %%H%x%%N\r\n"
+                                                  "  ImageBase.....: %%H%x%%N\r\n"
+                                                  "  ImageSize.....: %%H%Lx%%N\r\n"
+                                                  "  CodeType......: %%H%s%%N\r\n"
+                                                  "  DataType......: %%H%s%%N\r\n"
+                                                  "  Unload........: %%H%x%%N"
+
+#string STR_GOP_DUMP_MAIN         #language en-US "  Max Mode..............: %%H0x%08x%%N\r\n"
+                                                  "  Current Mode..........: %%H0x%08x%%N\r\n"
+                                                  "  Frame Buffer Base.....: %%H0x%L016x%%N\r\n"
+                                                  "  Frame Buffer Size.....: %%H0x%L016x%%N\r\n"
+                                                  "  Mode Info Size........: %%H0x%L016x%%N\r\n"
+                                                  "  Information\r\n"
+                                                  "    Version.............: %%H0x%08x%%N\r\n"
+                                                  "    HorizontalResolution: %%H%d%%N\r\n"
+                                                  "    VerticalResolution..: %%H%d%%N\r\n"
+                                                  "    Pixel Format........: %%H%s%%N\r\n"
+                                                  "    Pixels / Scan Line..: %%H%d%%N\r\n"
+                                                  "    Pixel Info\r\n"
+                                                  "      RedMask...........: %%H0x%08x%%N\r\n"
+                                                  "      GreenMask.........: %%H0x%08x%%N\r\n"
+                                                  "      BlueMask..........: %%H0x%08x%%N\r\n"
+
+#string STR_GOP_RES_LIST_MAIN     #language en-US "  Supported Resolution List"
+#string STR_GOP_RES_LIST_ENTRY    #language en-US "\r\n"
+                                                  "    Resolution[%%H%d%%N]:\r\n"
+                                                  "      Horizontal........: %%H%d%%N\r\n"
+                                                  "      Vertical..........: %%H%d%%N"
 #string STR_BSDO_DUMP_MAIN        #language en-US "     Drv[%02x] File:%%H%s%%N"
-#string STR_EDID_DISCOVERED_MAIN  #language en-US "     EDID Discovered Size : %%H0x%08x%%N\r\n"
-#string STR_EDID_DISCOVERED_DATA  #language en-US "     EDID Discovered Data :\r\n"
-#string STR_EDID_ACTIVE_MAIN      #language en-US "     EDID Active Size : %%H0x%08x%%N\r\n"
-#string STR_EDID_ACTIVE_DATA      #language en-US "     EDID Active Data :\r\n"
+#string STR_EDID_DISCOVERED_MAIN  #language en-US "  EDID Discovered Size : %%H0x%08x%%N\r\n"
+#string STR_EDID_DISCOVERED_DATA  #language en-US "  EDID Discovered Data :\r\n"
+#string STR_EDID_ACTIVE_MAIN      #language en-US "  EDID Active Size : %%H0x%08x%%N\r\n"
+#string STR_EDID_ACTIVE_DATA      #language en-US "  EDID Active Data :\r\n"
 
 #string STR_GET_SUPP_TYPES_FAILED         #language en-US "Unable to get supported types - %%H%r%%N\r\n"
 #string STR_SUPP_TYPE_HEADER              #language en-US "  Supported Information Types: \r\n"
-- 
2.12.2.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel