X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=scripts%2Fextract-ikconfig;h=72997c353cb363961139a8adf3dfa4ad1ae22d5a;hb=ef4bb70d876b4ae5787cc43727477d1a36cdc2e8;hp=8187e6f0dc2fe6da060f99f9980dbf90707c02cf;hpb=95d465fd750897ab32462a6702fbfe1b122cbbc0;p=sfrench%2Fcifs-2.6.git diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index 8187e6f0dc2f..72997c353cb3 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