From: Stephen Hemminger Date: Thu, 13 Nov 2008 16:33:00 +0000 (-0800) Subject: tracing/fastboot: put error message on stderr X-Git-Tag: firefly_0821_release~13991^2~465 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d1aaf8cf8afe70a8c2235a565885291fe290c57c;p=firefly-linux-kernel-4.4.55.git tracing/fastboot: put error message on stderr Since this scripts output is usually redirected, put error messages on standard error and exit with error code if no data is found. Signed-off-by: Stephen Hemminger Acked-by: Arjan van de Ven Signed-off-by: Ingo Molnar --- diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl index a8635a10fef2..f0af9aa9b243 100644 --- a/scripts/bootgraph.pl +++ b/scripts/bootgraph.pl @@ -78,11 +78,13 @@ while (<>) { } if ($count == 0) { - print "No data found in the dmesg. Make sure that 'printk.time=1' and\n"; - print "'initcall_debug' are passed on the kernel command line.\n\n"; - print "Usage: \n"; - print " dmesg | perl scripts/bootgraph.pl > output.svg\n\n"; - exit; + print STDERR < output.svg +END + exit 1; } print " \n";