summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/diskdrake/interactive.pm2
-rw-r--r--perl-install/fs/partitioning_wizard.pm2
-rw-r--r--perl-install/fs/proc_partitions.pm2
-rw-r--r--perl-install/partition_table/empty.pm4
-rw-r--r--perl-install/partition_table/raw.pm22
5 files changed, 18 insertions, 14 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 5b418d541..a23dcbe0c 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -327,7 +327,7 @@ sub Clear_all {
} else {
$hd->{readonly} = 0; #- give a way out of readonly-ness. only allowed when getting_rid_of_readonly_allowed
$hd->{getting_rid_of_readonly_allowed} = 0; #- we don't need this flag anymore
- partition_table::raw::zero_MBR_and_dirty($hd);
+ partition_table::raw::clear_and_dirty($hd);
}
}
diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm
index 067e47a8c..eb9266f7c 100644
--- a/perl-install/fs/partitioning_wizard.pm
+++ b/perl-install/fs/partitioning_wizard.pm
@@ -211,7 +211,7 @@ filesystem checks will be run on your next boot into Microsoft Windows®")) if $
title => N("Partitioning"),
icon => 'banner-part',
interactive_help_id => 'takeOverHdConfirm' }) or return;
- partition_table::raw::zero_MBR($hd);
+ partition_table::raw::clear($hd);
fsedit::auto_allocate($all_hds, $partitions);
1;
} ];
diff --git a/perl-install/fs/proc_partitions.pm b/perl-install/fs/proc_partitions.pm
index b65ff747a..84d686c45 100644
--- a/perl-install/fs/proc_partitions.pm
+++ b/perl-install/fs/proc_partitions.pm
@@ -64,7 +64,7 @@ sub compare {
sub use_ {
my ($hd) = @_;
- partition_table::raw::zero_MBR($hd);
+ partition_table::raw::clear($hd);
$hd->{readonly} = 1;
$hd->{getting_rid_of_readonly_allowed} = 1;
$hd->{primary} = { normal => [ grep { $_->{rootDevice} eq $hd->{device} } &read([$hd]) ] };
diff --git a/perl-install/partition_table/empty.pm b/perl-install/partition_table/empty.pm
index e5d3c5685..fb2d8ada3 100644
--- a/perl-install/partition_table/empty.pm
+++ b/perl-install/partition_table/empty.pm
@@ -1,7 +1,7 @@
package partition_table::empty; # $Id$
#- this is a mainly dummy partition table. If we find it's empty, we just call -
-#- zero_MBR which will take care of bless'ing us to the partition table type best
+#- ->clear which will take care of bless'ing us to the partition table type best
#- suited
@@ -28,7 +28,7 @@ sub read_one {
sysread $F, $tmp, 1024 or die "error reading magic number on disk $hd->{device}";
$tmp eq substr($tmp, 0, 1) x 1024 or die "bad magic number on disk $hd->{device}";
- partition_table::raw::zero_MBR($hd);
+ partition_table::raw::clear($hd);
$hd->{primary}{raw}, $hd->{primary}{info};
}
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 3a3ffd43d..95317cf72 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -212,15 +212,18 @@ sub default_type {
my $type = arch() =~ /ia64/ ? 'gpt' : arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : arch() eq "ppc" ? "mac" : "dos";
#- override standard mac type on PPC for IBM machines to dos
$type = "dos" if arch() =~ /ppc/ && detect_devices::get_mac_model() =~ /^IBM/;
- require "partition_table/$type.pm";
- "partition_table::$type";
+ $type;
}
-sub zero_MBR {
- my ($hd) = @_;
- #- force the standard partition type for the architecture
- my $type = default_type();
- $type->initialize($hd);
+sub zero_MBR { &clear } #- deprecated
+sub clear {
+ my ($hd, $o_type) = @_;
+
+ my $type = $o_type || default_type();
+
+ require "partition_table/$type.pm";
+ "partition_table::$type"->initialize($hd);
+
delete $hd->{extended};
if (detect_devices::is_xbox()) {
my $part = { start => 1, size => 15632048, pt_type => 0x0bf, isFormatted => 1 };
@@ -235,10 +238,11 @@ sub clear_existing {
partition_table::will_tell_kernel($hd, del => $_) foreach @parts;
}
-sub zero_MBR_and_dirty {
+sub zero_MBR_and_dirty { &clear_and_dirty } #- deprecated
+sub clear_and_dirty {
my ($hd) = @_;
$hd->clear_existing;
- zero_MBR($hd);
+ clear($hd);
}
sub read_primary {