summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive11
1 files changed, 8 insertions, 3 deletions
diff --git a/draklive b/draklive
index 76c66da..d230197 100755
--- a/draklive
+++ b/draklive
@@ -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