summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-08-04 07:35:29 +0000
committerOlivier Blin <oblin@mandriva.com>2009-08-04 07:35:29 +0000
commit59e175d9ad63a30e112f25fc98c17cfc98ceb1f5 (patch)
treed62e5d6882ba38a8f1be4d7025a9177c87ad5c96 /lib
parenta326e02822d048e9e497ace31b7bb07f26b6a7d7 (diff)
downloaddraklive-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar
draklive-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.gz
draklive-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.bz2
draklive-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.xz
draklive-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.zip
fix size approximations by using ceil
Diffstat (limited to 'lib')
-rw-r--r--lib/MDV/Draklive/Media.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm
index 159fab3..bb938ff 100644
--- a/lib/MDV/Draklive/Media.pm
+++ b/lib/MDV/Draklive/Media.pm
@@ -2,6 +2,7 @@ package MDV::Draklive::Media;
use MDK::Common;
use MDV::Draklive::Storage;
+use POSIX;
use common;
sub get_initrd_path {
@@ -69,7 +70,7 @@ sub supplement_partitions {
my $correction = 1.2;
my $slash = find { $_->{mntpoint} eq '/' } @{$media->{partitions}};
- $slash->{size} ||= int($total_size * $correction / $common::SECTORSIZE);
+ $slash->{size} ||= POSIX::ceil($total_size * $correction / $common::SECTORSIZE);
}
1;