summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-06 11:21:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-06 11:21:09 +0000
commitde4f752c310da49cfe15cc9cc90886354511b5cc (patch)
treed705e015afe68d2f4e341a895e9129765f9f7d0d /perl-install/fsedit.pm
parenteb80eb7030821b34ee0da643724e7cfff4194b47 (diff)
downloaddrakx-backup-do-not-use-de4f752c310da49cfe15cc9cc90886354511b5cc.tar
drakx-backup-do-not-use-de4f752c310da49cfe15cc9cc90886354511b5cc.tar.gz
drakx-backup-do-not-use-de4f752c310da49cfe15cc9cc90886354511b5cc.tar.bz2
drakx-backup-do-not-use-de4f752c310da49cfe15cc9cc90886354511b5cc.tar.xz
drakx-backup-do-not-use-de4f752c310da49cfe15cc9cc90886354511b5cc.zip
- fix range max value >2TB when creating a partition (useful for LVs >2TB)
nb: >> 11 and << 11 doesn't work on floats which we use to handle >2TB partitions. perl floats are precise enough up until 512TB
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm30
1 files changed, 15 insertions, 15 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 61951756a..91aee2f0d 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -21,26 +21,26 @@ use fs;
%suggestions = (
N_("simple") => [
- { mntpoint => "/", size => 300 << 11, fs_type => 'ext3', ratio => 5, maxsize => 8000 << 11 },
- { mntpoint => "swap", size => 64 << 11, fs_type => 'swap', ratio => 1, maxsize => 4000 << 11 },
- { mntpoint => "/home", size => 300 << 11, fs_type => 'ext3', ratio => 3 },
+ { mntpoint => "/", size => MB(300), fs_type => 'ext3', ratio => 5, maxsize => MB(8000) },
+ { mntpoint => "swap", size => MB(64), fs_type => 'swap', ratio => 1, maxsize => MB(4000) },
+ { mntpoint => "/home", size => MB(300), fs_type => 'ext3', ratio => 3 },
], N_("with /usr") => [
- { mntpoint => "/", size => 250 << 11, fs_type => 'ext3', ratio => 1, maxsize => 4000 << 11 },
- { mntpoint => "swap", size => 64 << 11, fs_type => 'swap', ratio => 1, maxsize => 4000 << 11 },
- { mntpoint => "/usr", size => 300 << 11, fs_type => 'ext3', ratio => 4, maxsize => 8000 << 11 },
- { mntpoint => "/home", size => 100 << 11, fs_type => 'ext3', ratio => 3 },
+ { mntpoint => "/", size => MB(250), fs_type => 'ext3', ratio => 1, maxsize => MB(4000) },
+ { mntpoint => "swap", size => MB(64), fs_type => 'swap', ratio => 1, maxsize => MB(4000) },
+ { mntpoint => "/usr", size => MB(300), fs_type => 'ext3', ratio => 4, maxsize => MB(8000) },
+ { mntpoint => "/home", size => MB(100), fs_type => 'ext3', ratio => 3 },
], N_("server") => [
- { mntpoint => "/", size => 150 << 11, fs_type => 'ext3', ratio => 1, maxsize => 4000 << 11 },
- { mntpoint => "swap", size => 64 << 11, fs_type => 'swap', ratio => 2, maxsize => 4000 << 11 },
- { mntpoint => "/usr", size => 300 << 11, fs_type => 'ext3', ratio => 4, maxsize => 8000 << 11 },
- { mntpoint => "/var", size => 200 << 11, fs_type => 'ext3', ratio => 3 },
- { mntpoint => "/home", size => 150 << 11, fs_type => 'ext3', ratio => 3 },
- { mntpoint => "/tmp", size => 150 << 11, fs_type => 'ext3', ratio => 2, maxsize => 4000 << 11 },
+ { mntpoint => "/", size => MB(150), fs_type => 'ext3', ratio => 1, maxsize => MB(4000) },
+ { mntpoint => "swap", size => MB(64), fs_type => 'swap', ratio => 2, maxsize => MB(4000) },
+ { mntpoint => "/usr", size => MB(300), fs_type => 'ext3', ratio => 4, maxsize => MB(8000) },
+ { mntpoint => "/var", size => MB(200), fs_type => 'ext3', ratio => 3 },
+ { mntpoint => "/home", size => MB(150), fs_type => 'ext3', ratio => 3 },
+ { mntpoint => "/tmp", size => MB(150), fs_type => 'ext3', ratio => 2, maxsize => MB(4000) },
],
);
foreach (values %suggestions) {
if (arch() =~ /ia64/) {
- @$_ = ({ mntpoint => "/boot/efi", size => 50 << 11, pt_type => 0xef, ratio => 1, maxsize => 150 << 11 }, @$_);
+ @$_ = ({ mntpoint => "/boot/efi", size => MB(50), pt_type => 0xef, ratio => 1, maxsize => MB(150) }, @$_);
}
}
@@ -296,7 +296,7 @@ sub is_one_big_fat_or_NT {
@$hds == 1 or return 0;
my @l = fs::get::hds_fstab(@$hds);
- @l == 1 && isFat_or_NTFS($l[0]) && fs::get::hds_free_space(@$hds) < 10 << 11;
+ @l == 1 && isFat_or_NTFS($l[0]) && fs::get::hds_free_space(@$hds) < MB(10);
}