kconfig_lint: Update prompt structure

- The prompts were not getting incremented, so each prompt for a symbol
would overwrite the previous.
- Record the menu each prompt is in.

Change-Id: Ia282a30344d5e135f4f2027be9aff0e49a4e5edb
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13461
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Martin Roth 2016-01-25 16:42:13 -07:00
parent 08ee1cfafc
commit b58d349ca9
1 changed files with 6 additions and 1 deletions

View File

@ -993,12 +993,17 @@ sub handle_prompt {
}
my $sym_num = $symbols{$inside_config}{count};
unless ( exists $symbols{$inside_config}{$sym_num}{prompt_max} ) {
if ( !exists $symbols{$inside_config}{$sym_num}{prompt_max} ) {
$symbols{$inside_config}{$sym_num}{prompt_max} = 0;
}
else {
$symbols{$inside_config}{$sym_num}{prompt_max}++;
}
my $prompt_max = $symbols{$inside_config}{$sym_num}{prompt_max};
$symbols{$inside_config}{$sym_num}{prompt}{$prompt_max}{prompt} = $prompt;
$symbols{$inside_config}{$sym_num}{prompt}{$prompt_max}{prompt_line_no} = $line_no;
$symbols{$inside_config}{$sym_num}{prompt}{$prompt_max}{prompt_menu} = @$menu_array_ref;
if ($expression) {
$symbols{$inside_config}{$sym_num}{prompt}{$prompt_max}{prompt_depends_on} = $expression;
}