]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/hwinfo/src/ids/get_pcmcia
4 # read /etc/pcmcia/config file
8 if(/^\s*card\s+"(.*)"\s*$/) {
15 if(/^\s*bind\s+"(\S+)"\s*$/) {
16 push @
{$card->{modules
}}, $1;
20 if(/^\s*bind\s+"(\S+)"\s*to\s*\d,\s*"(\S+)"\s*to\s*\d\s*$/) {
21 push @
{$card->{modules
}}, $1;
22 push @
{$card->{modules
}}, $2;
26 if(/^\s*manfid\s+(0x\S+),\s*(0x\S+)\s*$/) {
27 $card->{vendor
} = sprintf("0x%04x", hex $1);
28 $card->{device
} = sprintf("0x%04x", hex $2);
35 next unless $_->{modules
};
36 next unless $_->{name
} =~ /ethernet/i;
37 for $mods (@
{$_->{modules
}}) {
44 next unless $_->{vendor
};
45 next unless $_->{modules
};
46 print "# $_->{name}\n";
47 print " vendor.id\t\tpcmcia $_->{vendor}\n";
48 print "&device.id\t\tpcmcia $_->{device}\n";
51 for $mods (@
{$_->{modules
}}) {
52 $eth = 0 unless $eth{$mods};
53 print "+driver.module.modprobe\t$mods\n";
56 print "+baseclass.id\t\t0x002\n";
57 print "+subclass.id\t\t0x00\n";