From b58d349ca92b19869aaf9add81e83d37cad83a7a Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 25 Jan 2016 16:42:13 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/13461 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/lint/kconfig_lint | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'util/lint') diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 8bdca8d09b..2fbaf97f5c 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -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; } -- cgit v1.2.3