diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-01-06 15:54:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-01-06 15:54:32 +0000 |
commit | 6d4b82ccf955a867ce44e82e4dad4bb87e0ea456 (patch) | |
tree | 9350ca3c6d39ae4a0c06b5ae11fa60d7b91688ee | |
parent | 7503adced193b77d54c7f91ac23f1ebf96b69363 (diff) | |
download | drakx-backup-do-not-use-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar drakx-backup-do-not-use-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.gz drakx-backup-do-not-use-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.bz2 drakx-backup-do-not-use-6d4b82ccf955a867ce44e82e4dad4bb87e0ea456.tar.xz drakx-backup-do-not-use-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.pm | 9 |
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/ |