From a9042d2def58b5262e307f227432c27c45ff1d68 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 19 Sep 2007 14:50:34 +0000 Subject: - diskdrake: o "Clear All" defaults to LVM on full disk if drive is >4TB --- perl-install/partition_table.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index e249e2a83..5b2d30aaf 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -224,16 +224,19 @@ sub get_normal_parts_and_holes { } 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/; - $type; + my ($hd) = @_; + + arch() =~ /ia64/ ? 'gpt' : + arch() eq "alpha" ? "bsd" : + arch() =~ /^sparc/ ? "sun" : + arch() eq "ppc" && detect_devices::get_mac_model() !~ /^IBM/ ? "mac" : + $hd->{totalsectors} > 4 * 1024 * 1024 * 2048 ? 'lvm' : "dos"; #- default to LVM on full disk when >4TB } sub initialize { my ($hd, $o_type) = @_; - my $type = $o_type || _default_type(); + my $type = $o_type || _default_type($hd); require "partition_table/$type.pm"; "partition_table::$type"->initialize($hd); -- cgit v1.2.1