From 236dd0c9ff40e55042094e96917c7aaef723ee84 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 9 Dec 2008 19:07:34 +0000 Subject: normalize device IDs for devices cthat came from mouse.pm in order to track input devices whose format name differs between ldetect & mouse.pm (hexa vs base10) --- perl-install/harddrake/data.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'perl-install') 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