summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-18 11:22:05 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-18 11:22:05 +0000
commitb0d6d0b2db161a9df7938426be50b1ade4807215 (patch)
tree1e7f0fe92acc6cab0f51b3db1f9542d20621e774 /perl-install/detect_devices.pm
parentd9fc5f70b0c872f66b60649bca9a2fa4eb6aa762 (diff)
downloaddrakx-b0d6d0b2db161a9df7938426be50b1ade4807215.tar
drakx-b0d6d0b2db161a9df7938426be50b1ade4807215.tar.gz
drakx-b0d6d0b2db161a9df7938426be50b1ade4807215.tar.bz2
drakx-b0d6d0b2db161a9df7938426be50b1ade4807215.tar.xz
drakx-b0d6d0b2db161a9df7938426be50b1ade4807215.zip
(getSCSI) factorize vendor & model extraction
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 0022d4685..718cfd4ef 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -234,8 +234,9 @@ sub getSCSI() {
my $media_type = ${{ st => 'tape', sr => 'cdrom', sd => 'hd', sg => 'generic' }}{substr($device, 0, 2)} ||
$raw_type =~ /Scanner|Processor/ && 'scanner';
- push @l, { info => $get->('vendor') . ' ' . $get->('model'), host => $host, channel => $channel, id => $id, lun => $lun,
- description => join('|', $get->('vendor'), $get->('model')),
+ my ($vendor, $model) = ($get->('vendor'), $get->('model'));
+ push @l, { info => $vendor . ' ' . $model, host => $host, channel => $channel, id => $id, lun => $lun,
+ description => join('|', $vendor, $model),
bus => 'SCSI', media_type => $media_type, device => $device,
$usb_dir ? (
usb_vendor => hex($get_usb->('idVendor')), usb_id => hex($get_usb->('idProduct')),