diff options
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r-- | perl-install/partition_table/raw.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index db1d40584..c290258f5 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -191,14 +191,18 @@ sub raw_add { die "raw_add: partition table already full"; } -sub zero_MBR { - my ($hd) = @_; - #- force the standard partition type for the architecture +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"; - bless $hd, "partition_table::$type"; + "partition_table::$type"; +} + +sub zero_MBR { + my ($hd) = @_; + #- force the standard partition type for the architecture + bless $hd, default_type(); $hd->{primary} = $hd->clear_raw; delete $hd->{extended}; if (is_xbox()) { |