checkincludes.pl: provide usage helper
PATCH 6/18 checkincludes.pl: provide usage helper
From: "Luis R. Rodriguez" <[email protected]>
Signed-off-by Luis R. Rodriguez <[email protected]>
Cc Sam Ravnborg <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
scripts/checkincludes.pl | 9 +++++++++ 1 file changed, 9 insertions(+)
scripts/checkincludes.pl renamed from scripts/checkincludes.pl~checkincludespl-provide-usage-helper +9 -0
@@ -3,6 +3,15 @@ # checkincludes: Find files included more than once in (other) files. # Copyright abandoned, 2000, Niels Kristian Bech Jensen <[email protected]>. +sub usage { + print "Usage: checkincludes.pl <file list>\n"; + exit 1; +} + +if ($#ARGV < 0) { + usage(); +} + foreach $file (@ARGV) { open(FILE, $file) or die "Cannot open $file: $!.\n";
_