1 |
dmorgan |
1357 |
#!/usr/bin/perl |
2 |
|
|
|
3 |
|
|
use lib qw(/usr/lib/libDrakX); |
4 |
|
|
use detect_devices; |
5 |
|
|
|
6 |
|
|
require './merge2pcitable.pl'; |
7 |
|
|
my $usbtable = read_pcitable($ARGV[0]); |
8 |
|
|
|
9 |
|
|
foreach (values %$usbtable) { |
10 |
|
|
my $s = detect_devices::usb_description2removable($_->[1]) or next; |
11 |
|
|
if ($_->[0] =~ /Removable:(.*)/) { |
12 |
|
|
print STDERR "Conflicting $1 and $s for $_->[1]\n" if $1 ne $s; |
13 |
|
|
} else { |
14 |
|
|
print STDERR "Suggesting $s for $_->[1]\n"; |
15 |
|
|
$_->[0] = "Removable:$s" if $_->[0] eq 'usb-storage'; |
16 |
|
|
} |
17 |
|
|
} |
18 |
|
|
write_pcitable($usbtable); |