summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-18 12:13:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-18 12:13:49 +0000
commitb0fb8e21570e7d8f5b874e002e2b6455aa92c7f3 (patch)
tree704a509e3a00d924fc75569ece89cdc9953cce74
parent7adbdf7b9f2bccda2dbac6ebea515a815e849bf2 (diff)
downloaddrakx-backup-do-not-use-b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3.tar
drakx-backup-do-not-use-b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3.tar.gz
drakx-backup-do-not-use-b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3.tar.bz2
drakx-backup-do-not-use-b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3.tar.xz
drakx-backup-do-not-use-b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3.zip
create clear_existing()
-rw-r--r--perl-install/partition_table/raw.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index c3138a54a..3a3ffd43d 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -229,10 +229,15 @@ sub zero_MBR {
}
}
-sub zero_MBR_and_dirty {
- my ($hd) = @_;
+sub clear_existing {
+ my ($hd) = @_;
my @parts = (partition_table::get_normal_parts($hd), if_($hd->{primary}{extended}, $hd->{primary}{extended}));
partition_table::will_tell_kernel($hd, del => $_) foreach @parts;
+}
+
+sub zero_MBR_and_dirty {
+ my ($hd) = @_;
+ $hd->clear_existing;
zero_MBR($hd);
}