summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ce037a7af..aa4ba93f1 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -235,10 +235,13 @@ sub add2all_hds {
}
sub get_major_minor {
- eval {
- my (undef, $major, $minor) = devices::entry($_->{device});
- ($_->{major}, $_->{minor}) = ($major, $minor);
- } foreach @_;
+ my ($fstab) = @_;
+ foreach (@$fstab) {
+ eval {
+ my (undef, $major, $minor) = devices::entry($_->{device});
+ ($_->{major}, $_->{minor}) = ($major, $minor);
+ } if !$_->{major};
+ }
}
sub merge_info_from_mtab {
@@ -406,7 +409,7 @@ sub get_raw_hds {
push @{$all_hds->{raw_hds}}, detect_devices::removables();
$_->{is_removable} = 1 foreach @{$all_hds->{raw_hds}};
- get_major_minor(@{$all_hds->{raw_hds}});
+ get_major_minor($all_hds->{raw_hds});
my @fstab = read_fstab($prefix, '/etc/fstab', 'keep_default');
$all_hds->{nfss} = [ grep { $_->{fs_type} eq 'nfs' } @fstab ];