From 6d4b82ccf955a867ce44e82e4dad4bb87e0ea456 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 6 Jan 2009 15:54:32 +0000 Subject: 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] --- perl-install/harddrake/data.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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/ -- cgit v1.2.1