]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.c
ShellPkg: elevate DumpHex() from Debug1-internal to generic-internal
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / UefiShellDebug1CommandsLib.c
index 5f8f8a9dd95991bfb896f7bbbdb6e5dce0881ff0..1814564c12db16cdc900875717aebf6829810c6f 100644 (file)
@@ -113,76 +113,6 @@ UefiShellDebug1CommandsLibDestructor (
   return (EFI_SUCCESS);\r
 }\r
 \r
-STATIC CONST CHAR8 Hex[] = {\r
-  '0',\r
-  '1',\r
-  '2',\r
-  '3',\r
-  '4',\r
-  '5',\r
-  '6',\r
-  '7',\r
-  '8',\r
-  '9',\r
-  'A',\r
-  'B',\r
-  'C',\r
-  'D',\r
-  'E',\r
-  'F'\r
-};\r
-\r
-/**\r
-  Dump some hexadecimal data to the screen.\r
-\r
-  @param[in] Indent     How many spaces to indent the output.\r
-  @param[in] Offset     The offset of the printing.\r
-  @param[in] DataSize   The size in bytes of UserData.\r
-  @param[in] UserData   The data to print out.\r
-**/\r
-VOID\r
-DumpHex (\r
-  IN UINTN        Indent,\r
-  IN UINTN        Offset,\r
-  IN UINTN        DataSize,\r
-  IN VOID         *UserData\r
-  )\r
-{\r
-  UINT8 *Data;\r
-\r
-  CHAR8 Val[50];\r
-\r
-  CHAR8 Str[20];\r
-\r
-  UINT8 TempByte;\r
-  UINTN Size;\r
-  UINTN Index;\r
-\r
-  Data = UserData;\r
-  while (DataSize != 0) {\r
-    Size = 16;\r
-    if (Size > DataSize) {\r
-      Size = DataSize;\r
-    }\r
-\r
-    for (Index = 0; Index < Size; Index += 1) {\r
-      TempByte            = Data[Index];\r
-      Val[Index * 3 + 0]  = Hex[TempByte >> 4];\r
-      Val[Index * 3 + 1]  = Hex[TempByte & 0xF];\r
-      Val[Index * 3 + 2]  = (CHAR8) ((Index == 7) ? '-' : ' ');\r
-      Str[Index]          = (CHAR8) ((TempByte < ' ' || TempByte > 'z') ? '.' : TempByte);\r
-    }\r
-\r
-    Val[Index * 3]  = 0;\r
-    Str[Index]      = 0;\r
-    ShellPrintEx(-1, -1, L"%*a%08X: %-48a *%a*\r\n", Indent, "", Offset, Val, Str);\r
-\r
-    Data += Size;\r
-    Offset += Size;\r
-    DataSize -= Size;\r
-  }\r
-}\r
-\r
 /**\r
   Convert a Unicode character to upper case only if\r
   it maps to a valid small-case ASCII character.\r