diff options
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -668,7 +668,7 @@ sub allocate_partition { } sub allocate_master { - my ($dest, $size, $fs, $o_inode_size) = @_; + my ($media, $dest, $size, $fs, $o_inode_size) = @_; mkdir_p(dirname($dest)); my $heads = 16; my $sectors_per_track = 63; @@ -700,7 +700,8 @@ w EOF close($fdisk) or die "unable to run fdisk\n" . ("$!" ? "Error closing fdisk pipe: $!" : "Exit status $? from fdisk"); - return allocate_partition($dest, $sector_size, $fs, $o_inode_size); + my $inode_size = $media->get_media_setting('inode_size'); + return allocate_partition($dest, $sector_size, $fs, $inode_size); } sub create_disk_master { @@ -714,7 +715,7 @@ sub create_disk_master { 70000000) : directory_usage($live->get_system_root) + 200000000; - my $loop = allocate_master($dest, $disk_size, $live->{media}->get_media_setting('fs'), $live->{media}->get_media_setting('inode_size')); + my $loop = allocate_master($live->{media}, $dest, $disk_size, $live->{media}->get_media_setting('fs')); local $opts->{device} = $loop; local $opts->{disk_device} = $dest; record_master($live, $opts); @@ -1053,7 +1054,7 @@ sub create_usb_replicator { my $dest = get_disk_replicator_path($live); my %files = get_disk_replicator_files($live); my $size = fold_left { $::a + $::b } map { directory_usage($_, 'apparent') } keys(%files); - my $loop = allocate_master($dest, 5000000 + $size, 'vfat', $live->{replicator}{media}->get_media_setting('inode_size')); + my $loop = allocate_master($live->{replicator}{media}, $dest, 5000000 + $size, 'vfat'); my $opts = { device => $loop, disk_device => $dest, append => $live->{replicator}{append} }; record_usb_replicator($live, $opts); run_('losetup', '-d', $loop); |