From 7fc9e291d7581845461efbdd74b56a8e0360f1e0 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 15 Jul 2010 15:59:07 +0000 Subject: Trivial: Improve error reporting of sconfig slightly by reporting the line number. Signed-off-by: Patrick Georgi Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5665 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/sconfig/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/sconfig/main.c b/util/sconfig/main.c index 4b6258fbf9..062eedd2e0 100755 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -21,6 +21,8 @@ #include "sconfig.h" #include "sconfig.tab.h" +extern int linenum; + struct device *head, *lastdev; struct header headers; @@ -87,7 +89,7 @@ int yywrap(void) { void yyerror (char const *str) { - fprintf (stderr, "%s\n", str); + fprintf (stderr, "line %d: %s\n", linenum, str); } void postprocess_devtree(void) { -- cgit v1.2.3