tracing/fastboot: put error message on stderr
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 13 Nov 2008 16:33:00 +0000 (08:33 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 13 Nov 2008 18:58:22 +0000 (19:58 +0100)
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 <shemminger@vyatta.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
scripts/bootgraph.pl

index a8635a10fef28fa165df0aa4cb2ab545135042d3..f0af9aa9b243bcb1892ede765a44b2b225921046 100644 (file)
@@ -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 <<END;
+No data found in the dmesg. Make sure that 'printk.time=1' and
+'initcall_debug' are passed on the kernel command line.
+Usage:
+      dmesg | perl scripts/bootgraph.pl > output.svg
+END
+    exit 1;
 }
 
 print "<?xml version=\"1.0\" standalone=\"no\"?> \n";