diff options
-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 |