summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/raw.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-18 12:22:14 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-18 12:22:14 +0000
commitf110caf7fb05213848c2d48fc4802b7d6babbed3 (patch)
tree6bb604ad22264f653f0766dfe38421d73d0212d4 /perl-install/partition_table/raw.pm
parentb0fb8e21570e7d8f5b874e002e2b6455aa92c7f3 (diff)
downloaddrakx-f110caf7fb05213848c2d48fc4802b7d6babbed3.tar
drakx-f110caf7fb05213848c2d48fc4802b7d6babbed3.tar.gz
drakx-f110caf7fb05213848c2d48fc4802b7d6babbed3.tar.bz2
drakx-f110caf7fb05213848c2d48fc4802b7d6babbed3.tar.xz
drakx-f110caf7fb05213848c2d48fc4802b7d6babbed3.zip
rename ->zero_MBR into ->clear, and ->zero_MBR_and_dirty into ->clear_and_dirty
(old name kept for compatibility)
Diffstat (limited to 'perl-install/partition_table/raw.pm')
-rw-r--r--perl-install/partition_table/raw.pm22
1 files changed, 13 insertions, 9 deletions
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 {