git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/vmwgfx: return -EFAULT for copy_to_user errors
[safe/jmp/linux-2.6]
/
scripts
/
checkversion.pl
diff --git
a/scripts/checkversion.pl
b/scripts/checkversion.pl
index
9f84e56
..
b444e89
100755
(executable)
--- a/
scripts/checkversion.pl
+++ b/
scripts/checkversion.pl
@@
-1,27
+1,26
@@
#! /usr/bin/perl
#
#! /usr/bin/perl
#
-# checkversion find uses of LINUX_VERSION_CODE
, KERNEL_VERSION, or
-#
UTS_RELEASE
without including <linux/version.h>, or cases of
+# checkversion find uses of LINUX_VERSION_CODE
or KERNEL_VERSION
+# without including <linux/version.h>, or cases of
# including <linux/version.h> that don't need it.
# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>
# including <linux/version.h> that don't need it.
# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>
+use strict;
+
$| = 1;
$| = 1;
-my $debugging
= 0
;
+my $debugging;
-foreach $file (@ARGV)
-{
+foreach my $file (@ARGV) {
# Open this file.
# Open this file.
- open(FILE, $file) || die "Can't open $file: $!\n";
+ open( my $f, '<', $file )
+ or die "Can't open $file: $!\n";
# Initialize variables.
# Initialize variables.
- my $fInComment = 0;
- my $fInString = 0;
- my $fUseVersion = 0;
+ my ($fInComment, $fInString, $fUseVersion);
my $iLinuxVersion = 0;
my $iLinuxVersion = 0;
- LINE: while ( <FILE> )
- {
+ while (<$f>) {
# Strip comments.
$fInComment && (s+^.*?\*/+ +o ? ($fInComment = 0) : next);
m+/\*+o && (s+/\*.*?\*/+ +go, (s+/\*.*$+ +o && ($fInComment = 1)));
# Strip comments.
$fInComment && (s+^.*?\*/+ +o ? ($fInComment = 0) : next);
m+/\*+o && (s+/\*.*?\*/+ +go, (s+/\*.*$+ +o && ($fInComment = 1)));
@@
-41,11
+40,10
@@
foreach $file (@ARGV)
}
# Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE
}
# Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE
- if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/) ||
- ($_ =~ /UTS_RELEASE/)) {
+ if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) {
$fUseVersion = 1;
$fUseVersion = 1;
-
last LINE
if $iLinuxVersion;
- }
+
last
if $iLinuxVersion;
+
}
}
# Report used version IDs without include?
}
# Report used version IDs without include?
@@
-68,5
+66,5
@@
foreach $file (@ARGV)
}
}
}
}
- close(
FILE
);
+ close(
$f
);
}
}