History

Merge branch 'linus' into tracing/core

Conflicts: kernel/trace/trace_events_filter.c We use the tracing/core version.

Ingo Molnar committed 17 years ago

Commit 89034bc2 parents fb82ad7 85dfd811029 files · +32045 −16214Browse files

Showing the changes to scripts (6 of 1029 files). Show all

Unified · Split

6 files
  1. scripts/get_maintainer.pl +35 −7
  2. scripts/kconfig/lxdialog/util.c +2 −0
  3. scripts/kconfig/mconf.c +2 −0
  4. scripts/markup_oops.pl +3 −2
  5. scripts/package/builddeb +1 −1
  6. scripts/recordmcount.pl +8 −4
scripts/get_maintainer.pl+35−7
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313 use strict;
1414
1515 my $P = $0;
16−my $V = '0.16';
16+my $V = '0.17';
1717
1818 use Getopt::Long qw(:config no_auto_abbrev);
1919
@@ -27,6 +27,7 @@ my $email_git = 1; · 7 unmodified lines
2727 my $email_git_penguin_chiefs = 0;
2828 my $email_git_min_signatures = 1;
2929 my $email_git_max_maintainers = 5;
30+my $email_git_min_percent = 5;
3031 my $email_git_since = "1-year-ago";
3132 my $output_multiline = 1;
3233 my $output_separator = ", ";
@@ -65,6 +66,7 @@ if (!GetOptions( · 32 unmodified lines
6566 'git-chief-penguins!' => \$email_git_penguin_chiefs,
6667 'git-min-signatures=i' => \$email_git_min_signatures,
6768 'git-max-maintainers=i' => \$email_git_max_maintainers,
69+ 'git-min-percent=i' => \$email_git_min_percent,
6870 'git-since=s' => \$email_git_since,
6971 'm!' => \$email_maintainer,
7072 'n!' => \$email_usename,
@@ -132,6 +134,10 @@ while (<MAINT>) { · 61 unmodified lines
132134 $value =~ s@\.@\\\.@g; ##Convert . to \.
133135 $value =~ s/\*/\.\*/g; ##Convert * to .*
134136 $value =~ s/\?/\./g; ##Convert ? to .
137+ ##if pattern is a directory and it lacks a trailing slash, add one
138+ if ((-d $value)) {
139+ $value =~ s@([^/])$@$1/@;
140+ }
135141 }
136142 push(@typevalue, "$type:$value");
137143 } elsif (!/^(\s)*$/) {
@@ -146,8 +152,10 @@ close(MAINT); · 8 unmodified lines
146152 my @files = ();
147153
148154 foreach my $file (@ARGV) {
149− next if ((-d $file));
150− if (!(-f $file)) {
155+ ##if $file is a directory and it lacks a trailing slash, add one
156+ if ((-d $file)) {
157+ $file =~ s@([^/])$@$1/@;
158+ } elsif (!(-f $file)) {
151159 die "$P: file '${file}' not found\n";
152160 }
153161 if ($from_filename) {
@@ -292,7 +300,7 @@ sub file_match_pattern { · 138 unmodified lines
292300 sub usage {
293301 print <<EOT;
294302 usage: $P [options] patchfile
295− $P [options] -f file
303+ $P [options] -f file|directory
296304 version: $V
297305
298306 MAINTAINER field selection options:
@@ -301,6 +309,7 @@ MAINTAINER field selection options: · 2 unmodified lines
301309 --git-chief-penguins => include ${penguin_chiefs}
302310 --git-min-signatures => number of signatures required (default: 1)
303311 --git-max-maintainers => maximum maintainers to add (default: 5)
312+ --git-min-percent => minimum percentage of commits required (default: 5)
304313 --git-since => git history to use (default: 1-year-ago)
305314 --m => include maintainer(s) if any
306315 --n => include name 'Full Name <addr\@domain.tld>'
@@ -322,6 +331,15 @@ Other options: · 15 unmodified lines
322331 --version => show version
323332 --help => show this help information
324333
334+Notes:
335+ Using "-f directory" may give unexpected results:
336+
337+ Used with "--git", git signators for _all_ files in and below
338+ directory are examined as git recurses directories.
339+ Any specified X: (exclude) pattern matches are _not_ ignored.
340+ Used with "--nogit", directory is used as a pattern match,
341+ no individual file within the directory or subdirectory
342+ is matched.
325343 EOT
326344 }
327345
@@ -482,6 +500,7 @@ sub recent_git_signoffs { · 154 unmodified lines
482500 my $output = "";
483501 my $count = 0;
484502 my @lines = ();
503+ my $total_sign_offs;
485504
486505 if (which("git") eq "") {
487506 warn("$P: git not found. Add --nogit to options?\n");
@@ -505,17 +524,26 @@ sub recent_git_signoffs { · 17 unmodified lines
505524 $output =~ s/^\s*//gm;
506525
507526 @lines = split("\n", $output);
527+
528+ $total_sign_offs = 0;
529+ foreach my $line (@lines) {
530+ if ($line =~ m/([0-9]+)\s+(.*)/) {
531+ $total_sign_offs += $1;
532+ } else {
533+ die("$P: Unexpected git output: ${line}\n");
534+ }
535+ }
536+
508537 foreach my $line (@lines) {
509538 if ($line =~ m/([0-9]+)\s+(.*)/) {
510539 my $sign_offs = $1;
511540 $line = $2;
512541 $count++;
513542 if ($sign_offs < $email_git_min_signatures ||
514− $count > $email_git_max_maintainers) {
543+ $count > $email_git_max_maintainers ||
544+ $sign_offs * 100 / $total_sign_offs < $email_git_min_percent) {
515545 last;
516546 }
517− } else {
518− die("$P: Unexpected git output: ${line}\n");
519547 }
520548 if ($line =~ m/(.+)<(.+)>/) {
521549 my $git_name = $1;
scripts/kconfig/lxdialog/util.c+2−0
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2020 */
2121
22+#include <stdarg.h>
23+
2224 #include "dialog.h"
2325
2426 struct dialog_info dlg;
scripts/kconfig/mconf.c+2−0
@@ -888,6 +888,8 @@ int main(int ac, char **av) · 887 unmodified lines
888888 single_menu_mode = 1;
889889 }
890890
891+ initscr();
892+
891893 getyx(stdscr, saved_y, saved_x);
892894 if (init_dialog(NULL)) {
893895 fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
scripts/markup_oops.pl+3−2
@@ -1,6 +1,7 @@
11 #!/usr/bin/perl
22
33 use File::Basename;
4+use Math::BigInt;
45
56 # Copyright 2008, Intel Corporation
67 #
@@ -172,8 +173,8 @@ while (<STDIN>) { · 165 unmodified lines
172173 parse_x86_regs($line);
173174 }
174175
175−my $decodestart = hex($target) - hex($func_offset);
176−my $decodestop = hex($target) + 8192;
176+my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
177+my $decodestop = Math::BigInt->from_hex("0x$target") + 8192;
177178 if ($target eq "0") {
178179 print "No oops found!\n";
179180 print "Usage: \n";
scripts/package/builddeb+1−1
@@ -89,7 +89,7 @@ for script in postinst postrm preinst prerm ; do · 88 unmodified lines
8989 set -e
9090
9191 # Pass maintainer script parameters to hook scripts
92−export DEB_MAINT_PARAMS="\$@"
92+export DEB_MAINT_PARAMS="\$*"
9393
9494 test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
9595 exit 0
scripts/recordmcount.pl+8−4
@@ -392,7 +392,7 @@ while (<IN>) { · 391 unmodified lines
392392 $read_function = 0;
393393 }
394394 # print out any recorded offsets
395− update_funcs() if ($text_found);
395+ update_funcs() if (defined($ref_func));
396396
397397 # reset all markers and arrays
398398 $text_found = 0;
@@ -402,7 +402,6 @@ while (<IN>) { · 3 unmodified lines
402402 # section found, now is this a start of a function?
403403 } elsif ($read_function && /$function_regex/) {
404404 $text_found = 1;
405− $offset = hex $1;
406405 $text = $2;
407406
408407 # if this is either a local function or a weak function
@@ -411,10 +410,15 @@ while (<IN>) { · 2 unmodified lines
411410 if (!defined($locals{$text}) && !defined($weak{$text})) {
412411 $ref_func = $text;
413412 $read_function = 0;
413+ $offset = hex $1;
414414 } else {
415415 # if we already have a function, and this is weak, skip it
416− if (!defined($ref_func) || !defined($weak{$text})) {
416+ if (!defined($ref_func) && !defined($weak{$text}) &&
417+ # PPC64 can have symbols that start with .L and
418+ # gcc considers these special. Don't use them!
419+ $text !~ /^\.L/) {
417420 $ref_func = $text;
421+ $offset = hex $1;
418422 }
419423 }
420424 } elsif ($read_headers && /$mcount_section/) {
@@ -439,7 +443,7 @@ while (<IN>) { · 18 unmodified lines
439443 }
440444
441445 # dump out anymore offsets that may have been found
442−update_funcs() if ($text_found);
446+update_funcs() if (defined($ref_func));
443447
444448 # If we did not find any mcount callers, we are done (do nothing).
445449 if (!$opened) {