localmodconfig: Fix parsing of "help" text

Help text may start with "help" or "---help---". This patch fixes
read_kconfig() to recognize the second variant.

This removes useless junk from %depends and %selects. That junk is due to
help text that contains the words "selects" and "depends".

Link: http://lkml.kernel.org/r/1460333193-16361-2-git-send-email-bpoirier@suse.com

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Benjamin Poirier 2016-04-10 17:06:31 -07:00 committed by Steven Rostedt
parent 27b7156886
commit a77ed525d0
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ sub read_kconfig {
$iflevel-- if ($iflevel);
# stop on "help" and keywords that end a menu entry
} elsif (/^\s*help\s*$/ || /^(comment|choice|menu)\b/) {
} elsif (/^\s*(---)?help(---)?\s*$/ || /^(comment|choice|menu)\b/) {
$state = "NONE";
}
}