mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] scripts/decodecode: fix for /bin/sh
@ 2007-06-28 17:51 Randy Dunlap
  2007-06-28 21:42 ` [PATCH -mm] scripts/decodecode: fix for /bin/sh (cc your enemies) Oleg Verych
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2007-06-28 17:51 UTC (permalink / raw)
  To: lkml; +Cc: akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

Convert substring expressions to be sh-compatible.

Tested by Arne Georg Gleditsch <argggh@dolphinics.no>

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 scripts/decodecode |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.22-rc6-mm1.orig/scripts/decodecode
+++ linux-2.6.22-rc6-mm1/scripts/decodecode
@@ -28,7 +28,7 @@ if [ $marker -eq 0 ]; then
 fi
 
 if [ $marker -ne 0 ]; then
-	beforemark=${code:0:$((marker - 1))}
+	beforemark=`echo "$code" | cut -c-$((${marker} - 1))`
 	echo -n "	.byte 0x" > $T.s
 	echo $beforemark | sed -e 's/ /,0x/g' >> $T.s
 	as -o $T.o $T.s
@@ -36,7 +36,7 @@ if [ $marker -ne 0 ]; then
 	rm $T.o $T.s
 
 # and fix code at-and-after marker
-	code=${code:$marker}
+	code=`echo "$code" | cut -c$((${marker} + 1))-`
 fi
 
 code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g'`

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -mm] scripts/decodecode: fix for /bin/sh (cc your enemies)
  2007-06-28 17:51 [PATCH -mm] scripts/decodecode: fix for /bin/sh Randy Dunlap
@ 2007-06-28 21:42 ` Oleg Verych
  0 siblings, 0 replies; 2+ messages in thread
From: Oleg Verych @ 2007-06-28 21:42 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: akpm, lkml

* Date: Thu, 28 Jun 2007 10:51:37 -0700

I didn't want to respond to your prev. messages, because i felt, that
they will be mis-read again as my original NAK (ASCII negative
acknowledgement symbol, no other "fsky" meaning inside). Also i wanted
to come up with more nice tool, like colour support (like `ls' or 
`quilt diff'), CROSS toolchains support, nicer sed magic in implementation,
etc.

All this was in my short original comment. Yes that message was short and
somebody even thought i was not so polite -- from my POV that was
concrete description of the bug, with clear goodwill to help. Therefore,
IMNSHO one *must* suppress any personal angriness before replying to
(very simple and small in this case) technical issues.

Now i feel the same as Bartlomiej described in the discussion of regression
tracking, that got even quoted in LWN prev. kernel page [0].

I will not say i'm sad, i will say it's awesome to have so much attention
to silly issues like /bin/sh->/bin/bash. By the way it was Linus who
pointed out *my*, possibly bad, usage of GNU find extensions in the
Makefile near you. After that, i started to check at least busybox's
tools before i will go to GNU's luxury of features. And as you may
noticed, Ubuntu even defaults shell like dash in its setup, while in
Debian i have questions and/or `update-alternatives'.

It's obvious for me now, why that regression tracking thread has ended
without useful implementation ideas or counter-arguments against Debian
BTS....

[0] The Kernel page with link to "Cc those reviwers, who, you think, are
    your enemies" <http://lwn.net/Articles/238283/>

> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Convert substring expressions to be sh-compatible.
>
> Tested by Arne Georg Gleditsch <argggh@dolphinics.no>
____

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-28 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 17:51 [PATCH -mm] scripts/decodecode: fix for /bin/sh Randy Dunlap
2007-06-28 21:42 ` [PATCH -mm] scripts/decodecode: fix for /bin/sh (cc your enemies) Oleg Verych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®