diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-04-13 15:29:20 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-04-13 15:29:20 +0000 |
commit | 570d68e3c8d9a798dc4499d1bcfa83b55a78b26f (patch) | |
tree | 9a0f26e3903bb82cae22fe219fcd12ebecdf06a3 | |
parent | 0488889bd22528ced2529489ab1bbd8635e25227 (diff) | |
download | drakx-570d68e3c8d9a798dc4499d1bcfa83b55a78b26f.tar drakx-570d68e3c8d9a798dc4499d1bcfa83b55a78b26f.tar.gz drakx-570d68e3c8d9a798dc4499d1bcfa83b55a78b26f.tar.bz2 drakx-570d68e3c8d9a798dc4499d1bcfa83b55a78b26f.tar.xz drakx-570d68e3c8d9a798dc4499d1bcfa83b55a78b26f.zip |
create default_type() out of zero_MBR()
-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()) { |