Print output filename as part of warning messages

For example:
src/arm/at91-ariag25.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name

If output is to stdout then the prefix is "<stdout>: ".

This helps to direct the developer to where to look when multiple files are
being compiled in parallel.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Ian Campbell 2017-02-03 08:29:39 +00:00 committed by David Gibson
parent 120775eb1c
commit acd1b534a5
3 changed files with 46 additions and 40 deletions

2
dtc.c
View file

@ -309,6 +309,8 @@ int main(int argc, char *argv[])
else
die("Unknown input format \"%s\"\n", inform);
dti->outname = outname;
if (depfile) {
fputc('\n', depfile);
fclose(depfile);