diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-08-03 13:30:45 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-08-03 13:30:45 +0000 |
commit | a07fc75c9e082ea1612d89658ba3c1bba5eccc4a (patch) | |
tree | 1563a240cd9f81b8754320c7f26b880c218c0cf0 | |
parent | 6a5a7e6ed42d550615894963ab96f4d6f3f343f2 (diff) | |
download | draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.gz draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.bz2 draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.xz draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.zip |
extract get_harddisk_geometry
-rwxr-xr-x | draklive | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -683,13 +683,18 @@ sub allocate_partition { return $loop; } -sub allocate_master { - my ($live, $media, $dest) = @_; - +sub get_harddisk_geometry { + my ($media) = @_; my $geom = $media->{geom} || { heads => 16, sectors => 63, # sectors per track }; +} + +sub allocate_master { + my ($live, $media, $dest) = @_; + + my $geom = get_harddisk_geometry($media); my $required_sectors = fold_left { $::a + $::b } map { $_->{size} } @{$live->{media}{partitions}}; $required_sectors += $geom->{sectors}; # keep one more track |