From b0fb8e21570e7d8f5b874e002e2b6455aa92c7f3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Sep 2007 12:13:49 +0000 Subject: create clear_existing() --- perl-install/partition_table/raw.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'perl-install/partition_table') 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); } -- cgit v1.2.1