diff options
author | Martin Roth <martinroth@google.com> | 2016-01-25 16:42:13 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-01-30 17:28:44 +0100 |
commit | b58d349ca92b19869aaf9add81e83d37cad83a7a (patch) | |
tree | 34b774aa0ea92420eeec96b4f59cb16516c53f42 | |
parent | 08ee1cfafc2464cbeccaf3ede553b4c4e9b66367 (diff) | |
download | coreboot-b58d349ca92b19869aaf9add81e83d37cad83a7a.tar.xz |
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>
-rwxr-xr-x | util/lint/kconfig_lint | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |