From 59e175d9ad63a30e112f25fc98c17cfc98ceb1f5 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 4 Aug 2009 07:35:29 +0000 Subject: fix size approximations by using ceil --- lib/MDV/Draklive/Media.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/MDV/Draklive') 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; -- cgit v1.2.1