[edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~

Jeff Westfahl posted 1 patch 7 years, 6 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Jeff Westfahl 7 years, 6 months ago
ASCII characters {|}~ should be printed by DumpHex.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
---
 ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
index a2ebc8f..bd14878 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;
-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Carsey, Jaben 7 years, 6 months ago
I think that this is a correct change, but I do not understand the problem this solves.  

-Jaben

> -----Original Message-----
> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
> Sent: Wednesday, April 26, 2017 10:41 AM
> To: edk2-devel@lists.01.org
> Cc: Jeff Westfahl <jeff.westfahl@ni.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
> Carsey, Jaben <jaben.carsey@intel.com>
> Subject: [edk2][PATCH] ShellPkg/ShellCommandLib: Update DumpHex to
> print {|}~
> Importance: High
> 
> ASCII characters {|}~ should be printed by DumpHex.
> 
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
> ---
>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> index a2ebc8f..bd14878 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;
> --
> 2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Laszlo Ersek 7 years, 6 months ago
On 04/26/17 20:00, Carsey, Jaben wrote:
> I think that this is a correct change, but I do not understand the problem this solves.  

The problem is presumably 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.

Thanks,
Laszlo

> 
> -Jaben
> 
>> -----Original Message-----
>> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
>> Sent: Wednesday, April 26, 2017 10:41 AM
>> To: edk2-devel@lists.01.org
>> Cc: Jeff Westfahl <jeff.westfahl@ni.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
>> Carsey, Jaben <jaben.carsey@intel.com>
>> Subject: [edk2][PATCH] ShellPkg/ShellCommandLib: Update DumpHex to
>> print {|}~
>> Importance: High
>>
>> ASCII characters {|}~ should be printed by DumpHex.
>>
>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>> Cc: Jaben Carsey <jaben.carsey@intel.com>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
>> ---
>>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>> index a2ebc8f..bd14878 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;
>> --
>> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Jeff Westfahl 7 years, 6 months ago
Laszlo is correct.

On Wed, 26 Apr 2017, Laszlo Ersek wrote:

> On 04/26/17 20:00, Carsey, Jaben wrote:
>> I think that this is a correct change, but I do not understand the problem this solves.
>
> The problem is presumably 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.
>
> Thanks,
> Laszlo
>
>>
>> -Jaben
>>
>>> -----Original Message-----
>>> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
>>> Sent: Wednesday, April 26, 2017 10:41 AM
>>> To: edk2-devel@lists.01.org
>>> Cc: Jeff Westfahl <jeff.westfahl@ni.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
>>> Carsey, Jaben <jaben.carsey@intel.com>
>>> Subject: [edk2][PATCH] ShellPkg/ShellCommandLib: Update DumpHex to
>>> print {|}~
>>> Importance: High
>>>
>>> ASCII characters {|}~ should be printed by DumpHex.
>>>
>>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>>> Cc: Jaben Carsey <jaben.carsey@intel.com>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
>>> ---
>>>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>> index a2ebc8f..bd14878 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;
>>> --
>>> 2.7.4
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>>
>
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Jeff Westfahl 7 years, 6 months ago
Hi Laszlo,

I liked your description so much that I copied it basically word for word 
in my PATCH v2 commit description. Is there some way I can attribute this 
to you in the commit description?

Regards,
Jeff

On Wed, 26 Apr 2017, Laszlo Ersek wrote:

> On 04/26/17 20:00, Carsey, Jaben wrote:
>> I think that this is a correct change, but I do not understand the problem this solves.
>
> The problem is presumably 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.
>
> Thanks,
> Laszlo
>
>>
>> -Jaben
>>
>>> -----Original Message-----
>>> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
>>> Sent: Wednesday, April 26, 2017 10:41 AM
>>> To: edk2-devel@lists.01.org
>>> Cc: Jeff Westfahl <jeff.westfahl@ni.com>; Ni, Ruiyu <ruiyu.ni@intel.com>;
>>> Carsey, Jaben <jaben.carsey@intel.com>
>>> Subject: [edk2][PATCH] ShellPkg/ShellCommandLib: Update DumpHex to
>>> print {|}~
>>> Importance: High
>>>
>>> ASCII characters {|}~ should be printed by DumpHex.
>>>
>>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>>> Cc: Jaben Carsey <jaben.carsey@intel.com>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
>>> ---
>>>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>> index a2ebc8f..bd14878 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;
>>> --
>>> 2.7.4
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>>
>
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Laszlo Ersek 7 years, 6 months ago
On 04/26/17 21:37, Jeff Westfahl wrote:
> Hi Laszlo,
> 
> I liked your description so much that I copied it basically word for
> word in my PATCH v2 commit description. Is there some way I can
> attribute this to you in the commit description?

Sure! For example, add:

  (parts of) the commit message were inspired by Laszlo's example:
  https://lists.01.org/pipermail/edk2-devel/2017-April/010266.html

(Bonus points if you replace

  inspired by

with

  shamelessly stolen from

which is an expression I like a lot ;) )

Much appreciated! :)
Laszlo

> 
> Regards,
> Jeff
> 
> On Wed, 26 Apr 2017, Laszlo Ersek wrote:
> 
>> On 04/26/17 20:00, Carsey, Jaben wrote:
>>> I think that this is a correct change, but I do not understand the
>>> problem this solves.
>>
>> The problem is presumably 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.
>>
>> Thanks,
>> Laszlo
>>
>>>
>>> -Jaben
>>>
>>>> -----Original Message-----
>>>> From: Jeff Westfahl [mailto:jeff.westfahl@ni.com]
>>>> Sent: Wednesday, April 26, 2017 10:41 AM
>>>> To: edk2-devel@lists.01.org
>>>> Cc: Jeff Westfahl <jeff.westfahl@ni.com>; Ni, Ruiyu
>>>> <ruiyu.ni@intel.com>;
>>>> Carsey, Jaben <jaben.carsey@intel.com>
>>>> Subject: [edk2][PATCH] ShellPkg/ShellCommandLib: Update DumpHex to
>>>> print {|}~
>>>> Importance: High
>>>>
>>>> ASCII characters {|}~ should be printed by DumpHex.
>>>>
>>>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>>>> Cc: Jaben Carsey <jaben.carsey@intel.com>
>>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>>> Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
>>>> ---
>>>>  ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>>> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
>>>> index a2ebc8f..bd14878 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;
>>>> -- 
>>>> 2.7.4
>>>
>>> _______________________________________________
>>> edk2-devel mailing list
>>> edk2-devel@lists.01.org
>>> https://lists.01.org/mailman/listinfo/edk2-devel
>>>
>>
>>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ShellPkg/ShellCommandLib: Update DumpHex to print {|}~
Posted by Laszlo Ersek 7 years, 6 months ago
On 04/26/17 21:46, Laszlo Ersek wrote:
> On 04/26/17 21:37, Jeff Westfahl wrote:
>> Hi Laszlo,
>>
>> I liked your description so much that I copied it basically word for
>> word in my PATCH v2 commit description. Is there some way I can
>> attribute this to you in the commit description?
> 
> Sure! For example, add:

... since I've looked at the patch anyway, feel free to add my

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

as well.

Thanks!
Laszlo

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