diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.lib | 14 | ||||
| -rwxr-xr-x | scripts/checkpatch.pl | 2 | ||||
| -rwxr-xr-x | scripts/get_maintainer.pl | 84 | ||||
| -rw-r--r-- | scripts/markup_oops.pl | 2 | ||||
| -rw-r--r-- | scripts/mod/file2alias.c | 2 | ||||
| -rwxr-xr-x | scripts/recordmcount.pl | 2 |
6 files changed, 70 insertions, 36 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index cd815ac2a50b..f9bdf264473d 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -219,8 +219,13 @@ for F in $1; do \ | |||
| 219 | fsize=$$(stat -c "%s" $$F); \ | 219 | fsize=$$(stat -c "%s" $$F); \ |
| 220 | dec_size=$$(expr $$dec_size + $$fsize); \ | 220 | dec_size=$$(expr $$dec_size + $$fsize); \ |
| 221 | done; \ | 221 | done; \ |
| 222 | printf "%08x" $$dec_size | \ | 222 | printf "%08x\n" $$dec_size | \ |
| 223 | sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g' \ | 223 | sed 's/\(..\)/\1 /g' | { \ |
| 224 | read ch0 ch1 ch2 ch3; \ | ||
| 225 | for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \ | ||
| 226 | printf '%s%03o' '\\' $$((0x$$ch)); \ | ||
| 227 | done; \ | ||
| 228 | } \ | ||
| 224 | ) | 229 | ) |
| 225 | 230 | ||
| 226 | quiet_cmd_bzip2 = BZIP2 $@ | 231 | quiet_cmd_bzip2 = BZIP2 $@ |
| @@ -235,3 +240,8 @@ quiet_cmd_lzma = LZMA $@ | |||
| 235 | cmd_lzma = (cat $(filter-out FORCE,$^) | \ | 240 | cmd_lzma = (cat $(filter-out FORCE,$^) | \ |
| 236 | lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 241 | lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
| 237 | (rm -f $@ ; false) | 242 | (rm -f $@ ; false) |
| 243 | |||
| 244 | quiet_cmd_lzo = LZO $@ | ||
| 245 | cmd_lzo = (cat $(filter-out FORCE,$^) | \ | ||
| 246 | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | ||
| 247 | (rm -f $@ ; false) | ||
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bc4114f1ab30..3257d3d96767 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #!/usr/bin/perl -w | 1 | #!/usr/bin/perl -w |
| 2 | # (c) 2001, Dave Jones. <davej@redhat.com> (the file handling bit) | 2 | # (c) 2001, Dave Jones. (the file handling bit) |
| 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) | 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) |
| 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) | 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) |
| 5 | # (c) 2008,2009, Andy Whitcroft <apw@canonical.com> | 5 | # (c) 2008,2009, Andy Whitcroft <apw@canonical.com> |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 445e8845f0a4..090f24839700 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -296,46 +296,56 @@ my @status = (); | |||
| 296 | 296 | ||
| 297 | foreach my $file (@files) { | 297 | foreach my $file (@files) { |
| 298 | 298 | ||
| 299 | #Do not match excluded file patterns | 299 | my %hash; |
| 300 | 300 | my $tvi = find_first_section(); | |
| 301 | my $exclude = 0; | 301 | while ($tvi < @typevalue) { |
| 302 | foreach my $line (@typevalue) { | 302 | my $start = find_starting_index($tvi); |
| 303 | if ($line =~ m/^(\C):\s*(.*)/) { | 303 | my $end = find_ending_index($tvi); |
| 304 | my $type = $1; | 304 | my $exclude = 0; |
| 305 | my $value = $2; | 305 | my $i; |
| 306 | if ($type eq 'X') { | 306 | |
| 307 | if (file_match_pattern($file, $value)) { | 307 | #Do not match excluded file patterns |
| 308 | $exclude = 1; | ||
| 309 | last; | ||
| 310 | } | ||
| 311 | } | ||
| 312 | } | ||
| 313 | } | ||
| 314 | 308 | ||
| 315 | if (!$exclude) { | 309 | for ($i = $start; $i < $end; $i++) { |
| 316 | my $tvi = 0; | 310 | my $line = $typevalue[$i]; |
| 317 | my %hash; | ||
| 318 | foreach my $line (@typevalue) { | ||
| 319 | if ($line =~ m/^(\C):\s*(.*)/) { | 311 | if ($line =~ m/^(\C):\s*(.*)/) { |
| 320 | my $type = $1; | 312 | my $type = $1; |
| 321 | my $value = $2; | 313 | my $value = $2; |
| 322 | if ($type eq 'F') { | 314 | if ($type eq 'X') { |
| 323 | if (file_match_pattern($file, $value)) { | 315 | if (file_match_pattern($file, $value)) { |
| 324 | my $value_pd = ($value =~ tr@/@@); | 316 | $exclude = 1; |
| 325 | my $file_pd = ($file =~ tr@/@@); | ||
| 326 | $value_pd++ if (substr($value,-1,1) ne "/"); | ||
| 327 | if ($pattern_depth == 0 || | ||
| 328 | (($file_pd - $value_pd) < $pattern_depth)) { | ||
| 329 | $hash{$tvi} = $value_pd; | ||
| 330 | } | ||
| 331 | } | 317 | } |
| 332 | } | 318 | } |
| 333 | } | 319 | } |
| 334 | $tvi++; | ||
| 335 | } | 320 | } |
| 336 | foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { | 321 | |
| 337 | add_categories($line); | 322 | if (!$exclude) { |
| 323 | for ($i = $start; $i < $end; $i++) { | ||
| 324 | my $line = $typevalue[$i]; | ||
| 325 | if ($line =~ m/^(\C):\s*(.*)/) { | ||
| 326 | my $type = $1; | ||
| 327 | my $value = $2; | ||
| 328 | if ($type eq 'F') { | ||
| 329 | if (file_match_pattern($file, $value)) { | ||
| 330 | my $value_pd = ($value =~ tr@/@@); | ||
| 331 | my $file_pd = ($file =~ tr@/@@); | ||
| 332 | $value_pd++ if (substr($value,-1,1) ne "/"); | ||
| 333 | if ($pattern_depth == 0 || | ||
| 334 | (($file_pd - $value_pd) < $pattern_depth)) { | ||
| 335 | $hash{$tvi} = $value_pd; | ||
| 336 | } | ||
| 337 | } | ||
| 338 | } | ||
| 339 | } | ||
| 340 | } | ||
| 338 | } | 341 | } |
| 342 | |||
| 343 | $tvi += ($end - $start); | ||
| 344 | |||
| 345 | } | ||
| 346 | |||
| 347 | foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { | ||
| 348 | add_categories($line); | ||
| 339 | } | 349 | } |
| 340 | 350 | ||
| 341 | if ($email && $email_git) { | 351 | if ($email && $email_git) { |
| @@ -570,6 +580,20 @@ sub format_email { | |||
| 570 | return $formatted_email; | 580 | return $formatted_email; |
| 571 | } | 581 | } |
| 572 | 582 | ||
| 583 | sub find_first_section { | ||
| 584 | my $index = 0; | ||
| 585 | |||
| 586 | while ($index < @typevalue) { | ||
| 587 | my $tv = $typevalue[$index]; | ||
| 588 | if (($tv =~ m/^(\C):\s*(.*)/)) { | ||
| 589 | last; | ||
| 590 | } | ||
| 591 | $index++; | ||
| 592 | } | ||
| 593 | |||
| 594 | return $index; | ||
| 595 | } | ||
| 596 | |||
| 573 | sub find_starting_index { | 597 | sub find_starting_index { |
| 574 | my ($index) = @_; | 598 | my ($index) = @_; |
| 575 | 599 | ||
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl index 5f0fcb712e29..ce3e40b01e48 100644 --- a/scripts/markup_oops.pl +++ b/scripts/markup_oops.pl | |||
| @@ -154,7 +154,7 @@ while (<STDIN>) { | |||
| 154 | if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) { | 154 | if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) { |
| 155 | $target = $1; | 155 | $target = $1; |
| 156 | } | 156 | } |
| 157 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) { | 157 | if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) { |
| 158 | $function = $1; | 158 | $function = $1; |
| 159 | $func_offset = $2; | 159 | $func_offset = $2; |
| 160 | } | 160 | } |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 6f426afbc522..220213e603db 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
| @@ -804,7 +804,7 @@ static inline int sym_is(const char *symbol, const char *name) | |||
| 804 | match = strstr(symbol, name); | 804 | match = strstr(symbol, name); |
| 805 | if (!match) | 805 | if (!match) |
| 806 | return 0; | 806 | return 0; |
| 807 | return match[strlen(symbol)] == '\0'; | 807 | return match[strlen(name)] == '\0'; |
| 808 | } | 808 | } |
| 809 | 809 | ||
| 810 | static void do_table(void *symval, unsigned long size, | 810 | static void do_table(void *symval, unsigned long size, |
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 92f09fe9639e..ea6f6e3adaea 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl | |||
| @@ -194,7 +194,7 @@ sub check_objcopy | |||
| 194 | } | 194 | } |
| 195 | } | 195 | } |
| 196 | 196 | ||
| 197 | if ($arch eq "x86") { | 197 | if ($arch =~ /(x86(_64)?)|(i386)/) { |
| 198 | if ($bits == 64) { | 198 | if ($bits == 64) { |
| 199 | $arch = "x86_64"; | 199 | $arch = "x86_64"; |
| 200 | } else { | 200 | } else { |
