[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B507B73.6000404@s5r6.in-berlin.de>
Date: Fri, 15 Jan 2010 15:28:03 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Joe Perches <joe@...ches.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 (changelog update only)] scripts/get_maintainer.pl:
Add --sections, print entire matched subsystem
Joe Perches wrote:
> Sample output:
>
> $ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c
> USB SMSC95XX ETHERNET DRIVER
> M:Steve Glendinning <steve.glendinning@...c.com>
> L:netdev@...r.kernel.org
> S:Supported
> F:drivers/net/usb/smsc95xx.*
> USB SUBSYSTEM
> M:Greg Kroah-Hartman <gregkh@...e.de>
> L:linux-usb@...r.kernel.org
> W:http://www.linux-usb.org
> T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
[...]
Should it be machine-readable, or only human-readable?
In the latter case, some whitespace could be nice, like:
$ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c
USB SMSC95XX ETHERNET DRIVER
M:Steve Glendinning <steve.glendinning@...c.com>
L:netdev@...r.kernel.org
S:Supported
F:drivers/net/usb/smsc95xx.*
USB SUBSYSTEM
M:Greg Kroah-Hartman <gregkh@...e.de>
L:linux-usb@...r.kernel.org
W:http://www.linux-usb.org
T:quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
[...]
For example,
> @@ -346,6 +358,21 @@ foreach my $file (@files) {
> }
> foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {
> add_categories($line);
> + if ($sections) {
> + my $i;
> + my $start = find_starting_index($line);
> + my $end = find_ending_index($line);
> + for ($i = $start; $i < $end; $i++) {
> + my $line = $typevalue[$i];
> + if ($line =~ /^[FX]:/) { ##Restore file patterns
> + $line =~ s/([^\\])\.([^\*])/$1\?$2/g;
> + $line =~ s/([^\\])\.$/$1\?/g; ##Convert . back to ?
> + $line =~ s/\\\./\./g; ##Convert \. to .
> + $line =~ s/\.\*/\*/g; ##Convert .* to *
> + }
if ($line =~ /^.:/)
print(" ");
else
print("\n");
> + print("$line\n");
> + }
> + }
> }
> }
>
--
Stefan Richter
-=====-==-=- ---= -====
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists