summaryrefslogtreecommitdiffstats
path: root/scripts/decodecode
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-06-03 22:48:12 +0530
committerMichal Marek <mmarek@suse.cz>2010-06-04 10:26:35 +0200
commitb396aa03084b51f6822052a8070703287f198360 (patch)
tree6e7f018bb8aabcbab90a854e4da49fdff00db97b /scripts/decodecode
parentc8447161470d0292cc96b4f28f03a8eedb7806e9 (diff)
downloadlinux-stable-b396aa03084b51f6822052a8070703287f198360.tar.gz
linux-stable-b396aa03084b51f6822052a8070703287f198360.tar.bz2
linux-stable-b396aa03084b51f6822052a8070703287f198360.zip
scripts: decodecode: remove bashisms
Remove bashisms to make scripts/decodecode work with other shells. Signed-off-by: Rabin Vincent <rabin@rab.in> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/decodecode')
-rwxr-xr-xscripts/decodecode10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/decodecode b/scripts/decodecode
index 8b30cc36744f..18ba881c3415 100755
--- a/scripts/decodecode
+++ b/scripts/decodecode
@@ -40,7 +40,7 @@ echo $code
code=`echo $code | sed -e 's/.*Code: //'`
width=`expr index "$code" ' '`
-width=$[($width-1)/2]
+width=$((($width-1)/2))
case $width in
1) type=byte ;;
2) type=2byte ;;
@@ -48,10 +48,10 @@ case $width in
esac
disas() {
- ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s &> /dev/null
+ ${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
- if [ "$ARCH" == "arm" ]; then
- if [ $width == 2 ]; then
+ if [ "$ARCH" = "arm" ]; then
+ if [ $width -eq 2 ]; then
OBJDUMPFLAGS="-M force-thumb"
fi
@@ -59,7 +59,7 @@ disas() {
fi
${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \
- grep -v "/tmp\|Disassembly\|\.text\|^$" &> $1.dis
+ grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis 2>&1
}
marker=`expr index "$code" "\<"`