diff options
| author | Masahiro Yamada <masahiroy@kernel.org> | 2024-02-03 00:58:09 +0900 |
|---|---|---|
| committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-02-19 18:20:40 +0900 |
| commit | 40bab83a6595b3ab8afcfdb57903470f64fdbdb9 (patch) | |
| tree | 0ea85368b87904cf70a55d1fb95476b76d99c931 /scripts/kconfig/parser.y | |
| parent | kconfig: remove zconf_curname() and zconf_lineno() (diff) | |
| download | linux-40bab83a6595b3ab8afcfdb57903470f64fdbdb9.tar.gz linux-40bab83a6595b3ab8afcfdb57903470f64fdbdb9.zip | |
kconfig: associate struct menu with file name directly
struct menu is linked to struct file for diagnostic purposes.
It is always used to retrieve the file name through menu->file->name.
Associate struct menu with the file name directly.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/parser.y')
| -rw-r--r-- | scripts/kconfig/parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y index b9d7e26fc160..d1d05c8cd89d 100644 --- a/scripts/kconfig/parser.y +++ b/scripts/kconfig/parser.y @@ -101,7 +101,7 @@ struct menu *current_menu, *current_entry; %destructor { fprintf(stderr, "%s:%d: missing end statement for this entry\n", - $$->file->name, $$->lineno); + $$->filename, $$->lineno); if (current_menu == $$) menu_end_menu(); } if_entry menu_entry choice_entry @@ -527,11 +527,11 @@ static bool zconf_endtoken(const char *tokenname, yynerrs++; return false; } - if (current_menu->file != current_file) { + if (strcmp(current_menu->filename, cur_filename)) { zconf_error("'%s' in different file than '%s'", tokenname, expected_tokenname); fprintf(stderr, "%s:%d: location of the '%s'\n", - current_menu->file->name, current_menu->lineno, + current_menu->filename, current_menu->lineno, expected_tokenname); yynerrs++; return false; |
