From b0d6d0b2db161a9df7938426be50b1ade4807215 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Jan 2010 11:22:05 +0000 Subject: (getSCSI) factorize vendor & model extraction --- perl-install/detect_devices.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install') 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')), -- cgit v1.2.1