Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199549
b: refs/heads/master
c: a208868
h: refs/heads/master
i:
  199547: 6f7ae1c
v: v3
  • Loading branch information
Stephen Hemminger authored and Michal Marek committed Mar 7, 2010
1 parent 19e958a commit 8edd335
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3da27157316cbcce326d56faa0a7a5cadc7ae507
refs/heads/master: a208868fc0a90f62a91893b0193459de957c8d8e
23 changes: 11 additions & 12 deletions trunk/scripts/checkversion.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@
# including <linux/version.h> that don't need it.
# Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net>

use strict;

$| = 1;

my $debugging = 0;
my $debugging;

foreach $file (@ARGV)
{
foreach my $file (@ARGV) {
# 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.
my $fInComment = 0;
my $fInString = 0;
my $fUseVersion = 0;
my ($fInComment, $fInString, $fUseVersion);
my $iLinuxVersion = 0;

LINE: while ( <FILE> )
{
while (<$f>) {
# Strip comments.
$fInComment && (s+^.*?\*/+ +o ? ($fInComment = 0) : next);
m+/\*+o && (s+/\*.*?\*/+ +go, (s+/\*.*$+ +o && ($fInComment = 1)));
Expand All @@ -43,8 +42,8 @@
# Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE
if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) {
$fUseVersion = 1;
last LINE if $iLinuxVersion;
}
last if $iLinuxVersion;
}
}

# Report used version IDs without include?
Expand All @@ -67,5 +66,5 @@
}
}

close(FILE);
close($f);
}

0 comments on commit 8edd335

Please sign in to comment.