From 66f9f59a5bfcb9efc8acad5ff0ece02fdaca6817 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 24 Mar 2006 03:15:55 -0800 Subject: [PATCH] extract-ikconfig: use mktemp(1) Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/extract-ikconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/extract-ikconfig') diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index d9f9f34b22a..ef6140dc2de 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -45,7 +45,7 @@ then exit 1 fi -TMPFILE="/tmp/ikconfig-$$" +TMPFILE=`mktemp -t ikconfig-XXXXXX` || exit 1 image="$1" # vmlinux: Attempt to dump the configuration from the file directly -- cgit v1.2.3-70-g09d2 From ff45e99dcd31e1810a9892ce28190bff262e4e12 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 24 Mar 2006 03:15:56 -0800 Subject: [PATCH] extract-ikconfig: be sure binoffset exists before extracting Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/extract-ikconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/extract-ikconfig') diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index ef6140dc2de..be2e5797741 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -4,6 +4,7 @@ # $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" -- cgit v1.2.3-70-g09d2 From 008accbbae6b2f18c2039d563f28d46ff4388d36 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 24 Mar 2006 03:15:56 -0800 Subject: [PATCH] extract-ikconfig: don't use --long-options Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/extract-ikconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/extract-ikconfig') diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig index be2e5797741..8187e6f0dc2 100755 --- a/scripts/extract-ikconfig +++ b/scripts/extract-ikconfig @@ -21,7 +21,7 @@ function dump_config { let start="$start + 8" let size="$end - $start" - head --bytes="$end" "$file" | tail --bytes="$size" | zcat + dd if="$file" ibs=1 skip="$start" count="$size" 2>/dev/null | zcat clean_up exit 0 -- cgit v1.2.3-70-g09d2