mirror of
https://github.com/torvalds/linux.git
synced 2026-08-07 07:54:18 +02:00
Currently, the idems inside media Kconfig are out of order.
Sort them using the script below:
<script>
use strict;
use warnings;
my %config;
my @source;
my $out;
sub flush_config()
{
if (scalar %config) {
for my $c (sort keys %config) {
$out .= $config{$c} . "\n";
}
%config = ();
}
return if (!scalar @source);
$out .= "\n";
for my $s (sort @source) {
$out .= $s;
}
$out .= "\n";
@source = ();
}
sub sort_kconfig($)
{
my $fname = shift;
my $cur_config = "";
@source = ();
$out = "";
%config = ();
open IN, $fname or die;
while (<IN>) {
if (m/^config\s+(.*)/) {
$cur_config = $1;
$config{$cur_config} .= $_;
} elsif (m/^source\s+(.*)/) {
push @source, $_;
} elsif (m/^\s+/) {
if ($cur_config eq "") {
$out .= $_;
} else {
$config{$cur_config} .= $_;
}
} else {
flush_config();
$cur_config = "";
$out .= $_;
}
}
close IN or die;
flush_config();
$out =~ s/\n\n+/\n\n/g;
$out =~ s/\n+$/\n/;
open OUT, ">$fname";
print OUT $out;
close OUT;
}
for my $fname(@ARGV) {
sort_kconfig $fname
}
</script>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
||
|---|---|---|
| .. | ||
| a800.c | ||
| af9005-fe.c | ||
| af9005-remote.c | ||
| af9005-script.h | ||
| af9005.c | ||
| af9005.h | ||
| az6027.c | ||
| az6027.h | ||
| cinergyT2-core.c | ||
| cinergyT2-fe.c | ||
| cinergyT2.h | ||
| cxusb-analog.c | ||
| cxusb.c | ||
| cxusb.h | ||
| dib07x0.h | ||
| dib0700_core.c | ||
| dib0700_devices.c | ||
| dib0700.h | ||
| dibusb-common.c | ||
| dibusb-mb.c | ||
| dibusb-mc-common.c | ||
| dibusb-mc.c | ||
| dibusb.h | ||
| digitv.c | ||
| digitv.h | ||
| dtt200u-fe.c | ||
| dtt200u.c | ||
| dtt200u.h | ||
| dtv5100.c | ||
| dtv5100.h | ||
| dvb-usb-common.h | ||
| dvb-usb-dvb.c | ||
| dvb-usb-firmware.c | ||
| dvb-usb-i2c.c | ||
| dvb-usb-init.c | ||
| dvb-usb-remote.c | ||
| dvb-usb-urb.c | ||
| dvb-usb.h | ||
| dw2102.c | ||
| dw2102.h | ||
| gp8psk.c | ||
| gp8psk.h | ||
| Kconfig | ||
| m920x.c | ||
| m920x.h | ||
| Makefile | ||
| nova-t-usb2.c | ||
| opera1.c | ||
| pctv452e.c | ||
| technisat-usb2.c | ||
| ttusb2.c | ||
| ttusb2.h | ||
| umt-010.c | ||
| usb-urb.c | ||
| vp702x-fe.c | ||
| vp702x.c | ||
| vp702x.h | ||
| vp7045-fe.c | ||
| vp7045.c | ||
| vp7045.h | ||