From 13cf9dfbb5a8f5d89e6e84a87c9b8b1781d3ced4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Jan 2010 12:15:32 +0000 Subject: perl_checker cleanups --- perl-install/detect_devices.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 6005c2f94..01851ecca 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -218,7 +218,7 @@ sub getSCSI() { } warn("cannot get info for device ($_)"), next if !$device; - my $usb_dir = readlink("$dir") =~ m!/usb! && "$dir/../../../.."; + my $usb_dir = readlink($dir) =~ m!/usb! && "$dir/../../../.."; my $get_usb = sub { chomp_(cat_("$usb_dir/$_[0]")) }; my $get = sub { @@ -238,7 +238,7 @@ sub getSCSI() { foreach my $name (keys %hd_vendors) { next if !$name; ($vendor, $model) = ($hd_vendors{$name}, $2) if $model =~ /^$name(-|\s)*(.*)/; - }; + } 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, @@ -717,7 +717,7 @@ sub get_ids_from_sysfs_device { if ($bus eq 'pci') { my $device = basename(readlink $dev_path); my @ids = $device =~ /^(.{4}):(.{2}):(.{2})\.(.+)$/; - @{$sysfs_ids}{qw(pci_domain pci_bus pci_device pci_function)} = map { hex($_) } @ids if @ids; + @$sysfs_ids{qw(pci_domain pci_bus pci_device pci_function)} = map { hex($_) } @ids if @ids; } } $sysfs_ids; -- cgit v1.2.1