Skip to content

Commit

Permalink
tracing/fastboot: put error message on stderr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Arjan van de Ven <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Stephen Hemminger authored and Ingo Molnar committed Nov 13, 2008
1 parent 24de386 commit d1aaf8c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/bootgraph.pl
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@
}

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";
Expand Down

0 comments on commit d1aaf8c

Please sign in to comment.