mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[drivers] Sort PCI_ROM() entries numerically
Done with the help of this Perl script:
$MARKER = 'PCI_ROM'; # a regex
$AB = 1; # At Begin
@HEAD = ();
@ITEMS = ();
@TAIL = ();
foreach $fn (@ARGV) {
open(IN, $fn) or die "Can't open file '$fn': $!\n";
while (<IN>) {
if (/$MARKER/) {
push @ITEMS, $_;
$AB = 0; # not anymore at begin
}
else {
if ($AB) {
push @HEAD, $_;
}
else {
push @TAIL, $_;
}
}
}
} continue {
close IN;
open(OUT, ">$fn") or die "Can't open file '$fn' for output: $!\n";
print OUT @HEAD;
print OUT sort @ITEMS;
print OUT @TAIL;
close OUT;
# For a next file
$AB = 1;
@HEAD = ();
@ITEMS = ();
@TAIL = ();
}
Executed that script while src/drivers/ as current working directory,
provided '$(grep -rl PCI_ROM)' as argument.
Signed-off-by: Geert Stappers <stappers@stappers.it>
This commit is contained in:
committed by
Michael Brown
parent
582132fe3f
commit
e5f3ba0ca7
@@ -945,8 +945,8 @@ static struct net_device_operations b44_operations = {
|
||||
|
||||
|
||||
static struct pci_device_id b44_nics[] = {
|
||||
PCI_ROM(0x14e4, 0x4401, "BCM4401", "BCM4401", 0),
|
||||
PCI_ROM(0x14e4, 0x170c, "BCM4401-B0", "BCM4401-B0", 0),
|
||||
PCI_ROM(0x14e4, 0x4401, "BCM4401", "BCM4401", 0),
|
||||
PCI_ROM(0x14e4, 0x4402, "BCM4401-B1", "BCM4401-B1", 0),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user