X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fextract-ikconfig;h=d9f9f34b22abb1eb8dd6995e06ffe25ac230a4a2;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=8187e6f0dc2fe6da060f99f9980dbf90707c02cf;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index 8187e6f0d..d9f9f34b2 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -4,7 +4,6 @@ # $arg1 is [b]zImage filename binoffset="./scripts/binoffset" -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" @@ -21,7 +20,7 @@ function dump_config { let start="$start + 8" let size="$end - $start" - dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat + head --bytes="$end" "$file" | tail --bytes="$size" | zcat clean_up exit 0 @@ -46,7 +45,7 @@ then exit 1 fi -TMPFILE=`mktemp -t ikconfig-XXXXXX` || exit 1 +TMPFILE="/tmp/ikconfig-$$" image="$1" # vmlinux: Attempt to dump the configuration from the file directly