aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkincludes.pl
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@Atheros.com>2009-09-18 12:49:26 -0700
committerSam Ravnborg <sam@ravnborg.org>2009-09-20 12:27:43 +0200
commitf9d490ab374236a115440c771ecf0fb2890eb929 (patch)
treeab3e9b7598dcb5c9c8eb850db36df858059cac47 /scripts/checkincludes.pl
parentd9a7a2bd07ed3b838d95559d547061afcf3e45f6 (diff)
downloadkernel_samsung_smdk4412-f9d490ab374236a115440c771ecf0fb2890eb929.tar.gz
kernel_samsung_smdk4412-f9d490ab374236a115440c771ecf0fb2890eb929.tar.bz2
kernel_samsung_smdk4412-f9d490ab374236a115440c771ecf0fb2890eb929.zip
checkincludes.pl: provide usage helper
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/checkincludes.pl')
-rwxr-xr-xscripts/checkincludes.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl
index 32ebff659fc..4bff13985eb 100755
--- a/scripts/checkincludes.pl
+++ b/scripts/checkincludes.pl
@@ -3,6 +3,15 @@
# checkincludes: Find files included more than once in (other) files.
# Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>.
+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";