summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-08-03 13:30:45 +0000
committerOlivier Blin <oblin@mandriva.com>2009-08-03 13:30:45 +0000
commita07fc75c9e082ea1612d89658ba3c1bba5eccc4a (patch)
tree1563a240cd9f81b8754320c7f26b880c218c0cf0
parent6a5a7e6ed42d550615894963ab96f4d6f3f343f2 (diff)
downloaddraklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar
draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.gz
draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.bz2
draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.tar.xz
draklive-a07fc75c9e082ea1612d89658ba3c1bba5eccc4a.zip
extract get_harddisk_geometry
-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