summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index caff2f2a5..0b53dfa7a 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -292,14 +292,9 @@ sub load_thiskind($;&) {
sub get_pcmcia_devices($) {
my ($type) = @_;
- my $file = "/var/run/stab";
- my @devs;
- my $module;
- my $desc;
+ my (@devs, $module, $desc);
- local *F;
- open F, $file or return; #- no pcmcia is not an error.
- while (<F>) {
+ foreach (cat_("/var/run/stab")) {
$desc = $1 if /^Socket\s+\d+:\s+(.*)/;
$module = $1 if /^\d+\s+$type[^\s]*\s+([^\s]+)/;
if ($desc && $module) {