Skip to content

Commit d1aaf8c

Browse files
Stephen HemmingerIngo Molnar
authored andcommitted
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 <[email protected]> Acked-by: Arjan van de Ven <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 24de386 commit d1aaf8c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

scripts/bootgraph.pl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@
7878
}
7979

8080
if ($count == 0) {
81-
print "No data found in the dmesg. Make sure that 'printk.time=1' and\n";
82-
print "'initcall_debug' are passed on the kernel command line.\n\n";
83-
print "Usage: \n";
84-
print " dmesg | perl scripts/bootgraph.pl > output.svg\n\n";
85-
exit;
81+
print STDERR <<END;
82+
No data found in the dmesg. Make sure that 'printk.time=1' and
83+
'initcall_debug' are passed on the kernel command line.
84+
Usage:
85+
dmesg | perl scripts/bootgraph.pl > output.svg
86+
END
87+
exit 1;
8688
}
8789

8890
print "<?xml version=\"1.0\" standalone=\"no\"?> \n";

0 commit comments

Comments
 (0)