diff options
author | Jeff Westfahl <jeff.westfahl@ni.com> | 2017-04-27 03:59:29 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2017-05-04 15:58:44 +0800 |
commit | 4bf3b994e8b207fc919958b4a212a8342aaaa749 (patch) | |
tree | a25b089e942b2e99c10ee7217228edbbe90a285a /ShellPkg/Library/UefiShellCommandLib | |
parent | 350e9150ccc6db9b1785574c3e7f4b58c28eb45a (diff) | |
download | edk2-4bf3b994e8b207fc919958b4a212a8342aaaa749.tar.gz edk2-4bf3b994e8b207fc919958b4a212a8342aaaa749.tar.bz2 edk2-4bf3b994e8b207fc919958b4a212a8342aaaa749.zip |
ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
ASCII characters {|}~ should be printed by DumpHex. The problem is that
if you have a string like
{xizzy}~{foo|bar}~{quux}
in the dumped data, it will not appear as such in the *-delimited ASCII
column to the right, but as
.xizzy...foo.bar...quux.
which is less than ideal.
Most of the commit message was inspired by/shamelessly stolen from
Laszlo's example:
https://lists.01.org/pipermail/edk2-devel/2017-April/010266.html
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Diffstat (limited to 'ShellPkg/Library/UefiShellCommandLib')
-rw-r--r-- | ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c index a2ebc8f820..bd14878052 100644 --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c @@ -1745,7 +1745,7 @@ DumpHex ( Val[Index * 3 + 0] = Hex[TempByte >> 4];
Val[Index * 3 + 1] = Hex[TempByte & 0xF];
Val[Index * 3 + 2] = (CHAR8) ((Index == 7) ? '-' : ' ');
- Str[Index] = (CHAR8) ((TempByte < ' ' || TempByte > 'z') ? '.' : TempByte);
+ Str[Index] = (CHAR8) ((TempByte < ' ' || TempByte > '~') ? '.' : TempByte);
}
Val[Index * 3] = 0;
|