From ca03c6bb54ee989a3eedf88ba589914d6f897b8c Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Wed, 16 Mar 2016 21:27:27 +0100 Subject: [PATCH] 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 --- config/confdata.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- 2.31.1