diff options
-rwxr-xr-x | draklive | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -656,8 +656,9 @@ sub get_disk_master_path { } sub allocate_partition { - my ($dest, $sector_size, $fs, $o_inode_size) = @_; - my ($part_start, $part_nb_sectors) = run_program::get_stdout("sfdisk -d $dest") =~ /start=\s*(\d+),\s*size=\s*(\d+)/; + my ($dest, $part_idx, $sector_size, $fs, $o_inode_size) = @_; + my @parts = group_by2(run_program::get_stdout("sfdisk -d $dest") =~ /start=\s*(\d+),\s*size=\s*(\d+)/g); + my ($part_start, $part_nb_sectors) = @{$parts[$part_idx]}; require devices; my $loop = devices::find_free_loop(); @@ -702,7 +703,7 @@ EOF close($fdisk) or die "unable to run fdisk\n" . ("$!" ? "Error closing fdisk pipe: $!" : "Exit status $? from fdisk"); my $inode_size = $media->get_media_setting('inode_size'); - return allocate_partition($dest, $sector_size, $fs, $inode_size); + return allocate_partition($dest, 0, $sector_size, $fs, $inode_size); } sub create_disk_master { |