summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-09-12 03:24:59 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-09-12 03:24:59 +0000
commit137dec7aa285845e1f7b37fdf62d8c1812df95a3 (patch)
tree55b0103d12ee366a2a3fb62c9e9261f3e62a8d40 /perl-install/detect_devices.pm
parentf1f8d45f08037952d9d2c90be221ecd86c8cb283 (diff)
downloaddrakx-backup-do-not-use-137dec7aa285845e1f7b37fdf62d8c1812df95a3.tar
drakx-backup-do-not-use-137dec7aa285845e1f7b37fdf62d8c1812df95a3.tar.gz
drakx-backup-do-not-use-137dec7aa285845e1f7b37fdf62d8c1812df95a3.tar.bz2
drakx-backup-do-not-use-137dec7aa285845e1f7b37fdf62d8c1812df95a3.tar.xz
drakx-backup-do-not-use-137dec7aa285845e1f7b37fdf62d8c1812df95a3.zip
Made the association of model names obtained by auto-detection and of
the model names in the printer database much more reliable.
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 8b36f99dc..c60e356c2 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -591,8 +591,13 @@ sub whatUsbport() {
$manufacturer =~ s/Hewlett[-\s_]Packard/HP/;
$manufacturer =~ s/HEWLETT[-\s_]PACKARD/HP/;
}
+ # For HP's multi-function devices the real model name is in the "SKU"
+ # field. So use this field with priority for $model when it exists.
if (($idstr =~ /MDL:([^;]+);/) ||
($idstr =~ /MODEL:([^;]+);/)) {
+ $model = $1 if !$model;
+ }
+ if ($idstr =~ /SKU:([^;]+);/) {
$model = $1;
}
if (($idstr =~ /DES:([^;]+);/) ||