diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-22 18:00:12 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 19:04:06 +0200 |
commit | 32a94b8b0c3e5ae575919850c5e49e936b704d45 (patch) | |
tree | d3442edd51ead1e0345146b9e015358a199ced04 /scripts/kconfig/zconf.l | |
parent | kconfig: do not include both curses.h and ncurses.h for nconfig (diff) | |
download | linux-32a94b8b0c3e5ae575919850c5e49e936b704d45.tar.xz linux-32a94b8b0c3e5ae575919850c5e49e936b704d45.zip |
kconfig: remove duplicated file name and lineno of recursive inclusion
As in the unit test, the error message for the recursive inclusion
looks like this:
Kconfig.inc1:4: recursive inclusion detected. Inclusion path:
current file : 'Kconfig.inc1'
included from: 'Kconfig.inc3:1'
included from: 'Kconfig.inc2:3'
included from: 'Kconfig.inc1:4'
The 'Kconfig.inc1:4' is duplicated in the first and last lines.
Also, the single quotes do not help readability.
Change the message like follows:
Recursive inclusion detected.
Inclusion path:
current file : Kconfig.inc1
included from: Kconfig.inc3:1
included from: Kconfig.inc2:3
included from: Kconfig.inc1:4
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/zconf.l')
-rw-r--r-- | scripts/kconfig/zconf.l | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 88b650eb9cc9..6f139d2dc65a 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -328,14 +328,13 @@ void zconf_nextfile(const char *name) for (iter = current_file->parent; iter; iter = iter->parent ) { if (!strcmp(current_file->name,iter->name) ) { fprintf(stderr, - "%s:%d: recursive inclusion detected. " - "Inclusion path:\n current file : '%s'\n", - zconf_curname(), zconf_lineno(), - zconf_curname()); + "Recursive inclusion detected.\n" + "Inclusion path:\n" + " current file : %s\n", zconf_curname()); iter = current_file; do { iter = iter->parent; - fprintf(stderr, " included from: '%s:%d'\n", + fprintf(stderr, " included from: %s:%d\n", iter->name, iter->lineno - 1); } while (strcmp(iter->name, current_file->name)); exit(1); |