diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-08-04 07:35:29 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-08-04 07:35:29 +0000 |
commit | 59e175d9ad63a30e112f25fc98c17cfc98ceb1f5 (patch) | |
tree | d62e5d6882ba38a8f1be4d7025a9177c87ad5c96 /draklive | |
parent | a326e02822d048e9e497ace31b7bb07f26b6a7d7 (diff) | |
download | drakiso-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar drakiso-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.gz drakiso-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.bz2 drakiso-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.tar.xz drakiso-59e175d9ad63a30e112f25fc98c17cfc98ceb1f5.zip |
fix size approximations by using ceil
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,6 +31,7 @@ use Getopt::Long; use Pod::Usage; use File::Temp; use IO::Handle; #- autoflush +use POSIX; use MDV::Draklive::Utils; use MDV::Draklive::Live; use MDV::Draklive::Progress; @@ -696,7 +697,7 @@ sub get_hd_from_layout { my $geom = get_harddisk_geometry($media); my $required_sectors = fold_left { $::a + $::b } map { $_->{size} } @{$media->{partitions}}; $required_sectors += $geom->{sectors}; # keep one more track - $geom->{cylinders} = int($required_sectors / ($geom->{sectors} * $geom->{heads})); + $geom->{cylinders} = POSIX::ceil($required_sectors / ($geom->{sectors} * $geom->{heads})); my $total_sectors = $geom->{cylinders} * $geom->{heads} * $geom->{sectors}; my $hd = bless { totalsectors => $total_sectors, |