[PATCH 2/3] checkincludes.pl: provide usage helper

From: Luis R. Rodriguez
Date: Wed Aug 05 2009 - 20:52:03 EST


Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
---
scripts/checkincludes.pl | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl
index 32ebff6..4bff139 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@xxxxxxxx>.

+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";

--
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/