summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-27 22:08:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-27 22:08:01 +0000
commitd2e6bef17c3ae499c1be02e409e9fce7bb30fe19 (patch)
treea82c26572f659bc0292a8da9fc7d1a24e771639f /perl-install/install_any.pm
parentc0667d6fc71454925b5ae6a56477a8cc2fa76d22 (diff)
downloaddrakx-backup-do-not-use-d2e6bef17c3ae499c1be02e409e9fce7bb30fe19.tar
drakx-backup-do-not-use-d2e6bef17c3ae499c1be02e409e9fce7bb30fe19.tar.gz
drakx-backup-do-not-use-d2e6bef17c3ae499c1be02e409e9fce7bb30fe19.tar.bz2
drakx-backup-do-not-use-d2e6bef17c3ae499c1be02e409e9fce7bb30fe19.tar.xz
drakx-backup-do-not-use-d2e6bef17c3ae499c1be02e409e9fce7bb30fe19.zip
remove/simplify error hanling (most of it is moved to fsedit.pm)
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm27
1 files changed, 7 insertions, 20 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 9dc5b573d..85ce06463 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1003,22 +1003,11 @@ sub use_root_part {
}
sub getHds {
- my ($o, $f_err) = @_;
- my $ok = 1;
+ my ($o, $in) = @_;
my $try_scsi = !$::expert;
- my $flags = $o->{partitioning};
-
- my @drives = detect_devices::hds();
-# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table::raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
getHds:
- my $all_hds = catch_cdie { fsedit::hds(\@drives, $flags) }
- sub {
- $ok = 0;
- my $err = formatError($@);
- log::l("error reading partition table: $err");
- !$flags->{readonly} && $f_err and $f_err->($err);
- };
+ my $all_hds = fsedit::get_hds($o->{partitioning}, $in);
my $hds = $all_hds->{hds};
if (is_empty_array_ref($hds) && $try_scsi) {
@@ -1026,15 +1015,13 @@ sub getHds {
$o->setupSCSI; #- ask for an unautodetected scsi card
goto getHds;
}
- if (!$::testing) {
- @$hds = grep { eval { partition_table::raw::test_for_bad_drives($_) }; !$@ } @$hds;
- }
- $ok = fsedit::verifyHds($hds, $flags->{readonly}, $ok)
- if !($flags->{clearall} || $flags->{clear});
+ if (is_empty_array_ref($hds)) { #- no way
+ die _("An error occurred - no valid devices were found on which to create new filesystems. Please check your hardware for the cause of this problem");
+ }
#- try to figure out if the same number of hds is available, use them if ok.
- $ok && $hds && @$hds > 0 && @{$o->{all_hds}{hds} || []} == @$hds and return $ok;
+ @{$o->{all_hds}{hds} || []} == @$hds and return 1;
fs::get_raw_hds('', $all_hds);
fs::add2all_hds($all_hds, @{$o->{manualFstab}});
@@ -1062,7 +1049,7 @@ sub getHds {
}
#- a good job is to mount SunOS root partition, and to use mount point described here in /etc/vfstab.
- $ok;
+ 1;
}
sub log_sizes {