From: Paul Bolle Date: Wed, 16 Mar 2016 20:27:27 +0000 (+0100) Subject: kconfig: add unexpected data itself to warning X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=ca03c6bb54ee989a3eedf88ba589914d6f897b8c kconfig: add unexpected data itself to warning 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 Signed-off-by: Michal Marek Signed-off-by: Christian Lamparter --- diff --git a/config/confdata.c b/config/confdata.c index 5e585c4..e606f06 100644 --- a/config/confdata.c +++ b/config/confdata.c @@ -375,7 +375,9 @@ load: 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: