Skip to content

Commit

Permalink
kconfig: add unexpected data itself to warning
Browse files Browse the repository at this point in the history
If the .config parser runs into unexpected data it emits warnings like:
    .config:6911:warning: unexpected data

Add the unexpected data itself to this warning. That makes it easier to
discover what is actually going wrong:
     .config:6911:warning: unexpected data: CONFOG_CHARGER_TPS65217=m

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Michal Marek <mmarek@suse.com>
  • Loading branch information
Paul Bolle authored and Michal Marek committed May 10, 2016
1 parent f55532a commit a466391
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ int conf_read_simple(const char *name, int def)
continue;
} else {
if (line[0] != '\r' && line[0] != '\n')
conf_warning("unexpected data");
conf_warning("unexpected data: %.*s",
(int)strcspn(line, "\r\n"), line);

continue;
}
setsym:
Expand Down

0 comments on commit a466391

Please sign in to comment.