summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 6d07796d6..fc555c056 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -3,7 +3,7 @@ package fsedit;
use diagnostics;
use strict;
-use common qw(:common :constant);
+use common qw(:common :constant :functional);
use partition_table qw(:types);
use partition_table_raw;
use Data::Dumper;
@@ -50,10 +50,8 @@ sub hds($$) {
eval { partition_table::read($hd, $flags->{clearall}) };
if ($@) {
-# $@ =~ /bad magic number/ or die;
- $flags->{eraseBadPartitions} ?
- partition_table_raw::zero_MBR($hd) :
- die;
+ &cdie($@) unless $flags->{eraseBadPartitions};
+ partition_table_raw::zero_MBR($hd);
}
push @hds, $hd;
}