summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 19bae0339..23c58ba7d 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -105,11 +105,12 @@ sub getCompaqSmartArray() {
my $f;
for (my $i = 0; -r ($f = "/proc/array/ida$i"); $i++) {
- local *F;
- open F, $f or die;
- local $_ = <F>;
- my ($name) = m|ida/(.*?):| or next;
- push @idi, { device => $name, info => "Compaq RAID logical disk", type => 'hd' };
+ foreach (cat_($f)) {
+ if (m|^(ida/.*?):|) {
+ push @idi, { device => $1, info => "Compaq RAID logical disk", type => 'hd' };
+ last;
+ }
+ }
}
@idi;
}