kconfig: add unexpected data itself to warning
authorPaul Bolle <pebolle@tiscali.nl>
Wed, 16 Mar 2016 20:27:27 +0000 (21:27 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 5 Nov 2017 17:19:42 +0000 (18:19 +0100)
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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/confdata.c

index 5e585c4626e1e3399502d2fae0a98e732ee58733..e606f06fc9e557dc0401b44660bd1dae08b313c3 100644 (file)
@@ -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: