Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186258
b: refs/heads/master
c: 22dd5b0
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Linus Torvalds committed Mar 6, 2010
1 parent 996b76d commit 672a149
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 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: 64f77f312b15f101bf6c4c65d5359ccc16e3f82b
refs/heads/master: 22dd5b0cba50a197aaa3bd2790a29ee2e8e4e372
34 changes: 20 additions & 14 deletions trunk/scripts/get_maintainer.pl
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@
my @typevalue = ();
my %keyword_hash;

open(MAINT, "<${lk_path}MAINTAINERS") || die "$P: Can't open MAINTAINERS\n";
while (<MAINT>) {
open (my $maint, '<', "${lk_path}MAINTAINERS")
or die "$P: Can't open MAINTAINERS: $!\n";
while (<$maint>) {
my $line = $_;

if ($line =~ m/^(\C):\s*(.*)/) {
Expand All @@ -211,13 +212,14 @@
push(@typevalue, $line);
}
}
close(MAINT);
close($maint);

my %mailmap;

if ($email_remove_duplicates) {
open(MAILMAP, "<${lk_path}.mailmap") || warn "$P: Can't open .mailmap\n";
while (<MAILMAP>) {
open(my $mailmap, '<', "${lk_path}.mailmap")
or warn "$P: Can't open .mailmap: $!\n";
while (<$mailmap>) {
my $line = $_;

next if ($line =~ m/^\s*#/);
Expand All @@ -236,7 +238,7 @@
$mailmap{$name} = \@arr;
}
}
close(MAILMAP);
close($mailmap);
}

## use the filenames on the command line or find the filenames in the patchfiles
Expand All @@ -262,9 +264,10 @@
if ($from_filename) {
push(@files, $file);
if (-f $file && ($keywords || $file_emails)) {
open(FILE, "<$file") or die "$P: Can't open ${file}\n";
my $text = do { local($/) ; <FILE> };
close(FILE);
open(my $f, '<', $file)
or die "$P: Can't open $file: $!\n";
my $text = do { local($/) ; <$f> };
close($f);
if ($keywords) {
foreach my $line (keys %keyword_hash) {
if ($text =~ m/$keyword_hash{$line}/x) {
Expand All @@ -280,8 +283,10 @@
} else {
my $file_cnt = @files;
my $lastfile;
open(PATCH, "<$file") or die "$P: Can't open ${file}\n";
while (<PATCH>) {

open(my $patch, '<', $file)
or die "$P: Can't open $file: $!\n";
while (<$patch>) {
my $patch_line = $_;
if (m/^\+\+\+\s+(\S+)/) {
my $filename = $1;
Expand All @@ -301,7 +306,8 @@
}
}
}
close(PATCH);
close($patch);

if ($file_cnt == @files) {
warn "$P: file '${file}' doesn't appear to be a patch. "
. "Add -f to options?\n";
Expand Down Expand Up @@ -1286,7 +1292,7 @@ sub rfc822_strip_comments {

# valid: returns true if the parameter is an RFC822 valid address
#
sub rfc822_valid ($) {
sub rfc822_valid {
my $s = rfc822_strip_comments(shift);

if (!$rfc822re) {
Expand All @@ -1306,7 +1312,7 @@ ($)
# from success with no addresses found, because an empty string is
# a valid list.

sub rfc822_validlist ($) {
sub rfc822_validlist {
my $s = rfc822_strip_comments(shift);

if (!$rfc822re) {
Expand Down

0 comments on commit 672a149

Please sign in to comment.