kconfig: add check if end exists in extract-ikconfig
authorSteven Rostedt <srostedt@redhat.com>
Thu, 30 Apr 2009 16:19:56 +0000 (12:19 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Aug 2009 01:59:26 +0000 (21:59 -0400)
Both start and end should be tested for existence before continuing
to parse the config.gz file.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
scripts/extract-ikconfig

index 72997c3..42d6bce 100755 (executable)
@@ -17,6 +17,10 @@ dump_config() {
        return
     fi
     end=`$binoffset $file $IKCFG_ED 2>/dev/null`
+    [ "$?" != "0" ] && end="-1"
+    if [ "$end" -eq "-1" ]; then
+       return
+    fi
 
     start=`expr $start + 8`
     size=`expr $end - $start`