linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / scripts / extract-ikconfig
index 8187e6f..d9f9f34 100755 (executable)
@@ -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