summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-01-06 15:54:32 +0000
committerThierry Vignaud <tv@mandriva.org>2009-01-06 15:54:32 +0000
commit6d4b82ccf955a867ce44e82e4dad4bb87e0ea456 (patch)
tree9350ca3c6d39ae4a0c06b5ae11fa60d7b91688ee
parent7503adced193b77d54c7f91ac23f1ebf96b69363 (diff)
downloaddrakx-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar
drakx-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.gz
drakx-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.bz2
drakx-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.xz
drakx-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.zip
normalize device IDs for devices that came from mouse.pm in order to
track input devices whose format name differs between ldetect & mouse.pm (hexa vs base10) [backported from trunk]
-rw-r--r--perl-install/harddrake/data.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index 9d538c0aa..c914c0d5c 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -11,6 +11,15 @@ our ($version, $sbindir, $bindir) = ("10", "/usr/sbin", "/usr/bin");
my @devices = (detect_devices::probeall(), detect_devices::getSCSI());
+foreach my $dev (@devices) {
+ # normalize device IDs for devices cthat came from mouse.pm:
+ next if !defined $dev->{Synaptics};
+ foreach my $field (qw(vendor id subvendor subid)) {
+ next if !defined $dev->{$field};
+ $dev->{$field} = hex($dev->{$field});
+ }
+}
+
# Update me each time you handle one more devices class (aka configurator)
sub unknown() {
grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|RAID|SCSI)|SYSTEM_OTHER|tape|UPS/