summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive6
-rw-r--r--lib/MDV/Draklive/Media.pm3
2 files changed, 4 insertions, 5 deletions
diff --git a/draklive b/draklive
index f730386..b79c3aa 100755
--- a/draklive
+++ b/draklive
@@ -784,7 +784,7 @@ sub format_disk {
my ($live, $opts) = @_;
my $slash_size = guess_disk_master_size($live);
- $live->{media}->supplement_partitions($slash_size);
+ $live->{media}->supplement_slash_size($slash_size);
format_master($live, $live->{media}, $opts);
}
@@ -804,7 +804,7 @@ sub create_disk_master {
my ($live, $opts) = @_;
my $slash_size = guess_disk_master_size($live);
- $live->{media}->supplement_partitions($slash_size);
+ $live->{media}->supplement_slash_size($slash_size);
$opts->{device} ||= get_disk_master_path($live);
allocate_master($live, $live->{media}, $opts);
@@ -1226,7 +1226,7 @@ sub create_usb_replicator {
my %files = get_disk_replicator_files($live);
my $size = fold_left { $::a + $::b } map { directory_usage($_, 'apparent') } keys(%files);
- $live->{replicator}{media}->supplement_partitions($size);
+ $live->{replicator}{media}->supplement_slash_size($size);
my $opts = { device => get_disk_replicator_path($live) };
allocate_master($live, $live->{replicator}{media}, $opts);
diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm
index f86d01e..f950c88 100644
--- a/lib/MDV/Draklive/Media.pm
+++ b/lib/MDV/Draklive/Media.pm
@@ -73,9 +73,8 @@ sub find_boot_partition_index {
$media->find_partition_index('/boot') || $media->find_partition_index('/');
}
-sub supplement_partitions {
+sub supplement_slash_size {
my ($media, $total_size) = @_;
-
my $correction = 1.2;
my $slash = find { $_->{mntpoint} eq '/' } @{$media->{partitions}};
$slash->{size} ||= POSIX::ceil($total_size * $correction / $common::SECTORSIZE);