From: Randy Dunlap <randy.dunlap@oracle.com>
To: Werner Almesberger <werner@openmoko.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] remove bashisms from scripts/extract-ikconfig
Date: Wed, 12 Nov 2008 11:13:06 -0800 [thread overview]
Message-ID: <491B2AC2.6060603@oracle.com> (raw)
In-Reply-To: <20081112183935.GA8443@almesberger.net>
Werner Almesberger wrote:
> unbashify-extract-ikconfig.patch
>
> scripts/extract-ikconfig contains a lot of gratuituous bashisms,
> which make it fail if /bin/sh isn't bash. This patch replaces them
> with regular Bourne shell constructs.
>
> Signed-off-by: Werner Almesberger <werner@openmoko.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com> # as file author
> ---
>
> diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
> index 8187e6f..72997c3 100755
> --- a/scripts/extract-ikconfig
> +++ b/scripts/extract-ikconfig
> @@ -8,8 +8,8 @@ test -e $binoffset || cc -o $binoffset ./scripts/binoffset.c || exit 1
>
> IKCFG_ST="0x49 0x4b 0x43 0x46 0x47 0x5f 0x53 0x54"
> IKCFG_ED="0x49 0x4b 0x43 0x46 0x47 0x5f 0x45 0x44"
> -function dump_config {
> - typeset file="$1"
> +dump_config() {
> + file="$1"
>
> start=`$binoffset $file $IKCFG_ST 2>/dev/null`
> [ "$?" != "0" ] && start="-1"
> @@ -18,8 +18,8 @@ function dump_config {
> fi
> end=`$binoffset $file $IKCFG_ED 2>/dev/null`
>
> - let start="$start + 8"
> - let size="$end - $start"
> + start=`expr $start + 8`
> + size=`expr $end - $start`
>
> dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat
>
> --
--
~Randy
next prev parent reply other threads:[~2008-11-12 19:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 18:39 [PATCH] remove bashisms from scripts/extract-ikconfig Werner Almesberger
2008-11-12 19:13 ` Randy Dunlap [this message]
2008-11-22 11:24 ` Sam Ravnborg
-- strict thread matches above, loose matches on Subject: below --
2007-06-09 19:22 [PATCH] Remove " Christian Kujau
2007-06-09 19:26 ` Julio M. Merino Vidal
2007-06-09 19:34 ` Christian Kujau
2007-06-09 19:39 ` Julio M. Merino Vidal
2007-06-09 19:53 ` Willy Tarreau
2007-06-09 20:14 ` Christian Kujau
2007-11-14 23:44 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491B2AC2.6060603@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=werner@openmoko.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.