lkml.org 
[lkml]   [2021]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] scripts/decodecode: fix faulting instruction no print when opps.file is DOS format
On Thu, Sep 30, 2021 at 10:04:39AM +0800, unknown wrote:
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

You don't just add Signed-off-by of other people when sending a patch -
please don't *ever* do that.

If you don't know what you're doing, *don't* do it but *read* the damn
docs first:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html

> Cc: Marc Zyngier <maz@misterjones.org>
> Cc: Will Deacon <will@kernel.org>
> Cc: Rabin Vincent <rabin@rab.in>
> Cc: lkml <linux-kernel@vger.kernel.org>
> Signed-off-by: weidonghui <weidonghui@allwinnertech.com>
> ---
> scripts/decodecode | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/decodecode b/scripts/decodecode
> index 31d884e35f2f..77a3b518aacc 100755
> --- a/scripts/decodecode
> +++ b/scripts/decodecode
> @@ -126,7 +126,7 @@ if [ $marker -ne 0 ]; then
> fi
> echo Code starting with the faulting instruction > $T.aa
> echo =========================================== >> $T.aa
> -code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g; s/[>)]$//'`
> +code=`echo $code | sed -e 's/\x0d//;s/ [<(]/ /;s/[>)] / /;s/ /,0x/g; s/[>)]$//'`

So that link I pointed you to says:

"That character is matched with \r by sed. Use:

sed -e "s/\r//g" input-file"

I have no clue how you did not see it?!

But I guess \x0d works too.

To quote from the sed info manual:

"5.8 Escape Sequences - specifying special characters
====================================================

...

'\r'
Produces or matches a carriage return (ASCII 13).

...

'\xXX'
Produces or matches a character whose hexadecimal ASCII value is
XX."

In any case, I'd prefer \r because it is more readable.

Thx.

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

\
 
 \ /
  Last update: 2021-09-30 14:20    [W:0.142 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site