diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-09-11 10:02:38 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-09-11 10:02:38 +0000 |
commit | 419e2de474770458eb4f91be1d03549135b14f21 (patch) | |
tree | 597c4653b77ec71039f0df71a6c1b646606318e9 | |
parent | a7aa083be99f6fc796ea47bc35ae633cb0766aed (diff) | |
download | draklive-419e2de474770458eb4f91be1d03549135b14f21.tar draklive-419e2de474770458eb4f91be1d03549135b14f21.tar.gz draklive-419e2de474770458eb4f91be1d03549135b14f21.tar.bz2 draklive-419e2de474770458eb4f91be1d03549135b14f21.tar.xz draklive-419e2de474770458eb4f91be1d03549135b14f21.zip |
extract guess_disk_master_size
-rwxr-xr-x | draklive | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -785,8 +785,8 @@ sub format_disk { format_master($live, $live->{media}, $opts); } -sub create_disk_master { - my ($live, $opts) = @_; +sub guess_disk_master_size { + my ($live) = @_; my $slash_size = @{$live->{mount}{dirs} || []} ? (directory_usage($live->get_builddir . $live->{prefix}{build}{loopbacks}) + @@ -794,7 +794,12 @@ sub create_disk_master { directory_usage($live->get_builddir . $live->{prefix}{build}{files}) ) : directory_usage($live->get_system_root); +} + +sub create_disk_master { + my ($live, $opts) = @_; + my $slash_size = guess_disk_master_size($live); $live->{media}->supplement_partitions($slash_size); $opts->{device} ||= get_disk_master_path($live); |