diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-08-03 10:32:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-08-03 10:32:59 +0000 |
commit | bea6eafdd0ef6d6d06237b18577f1fd8118b603b (patch) | |
tree | 6e94a797299f4f183fda82aeb42ab05bfd769339 | |
parent | c72d7bdafa5400200ab12301e29417689658ac5e (diff) | |
download | drakiso-bea6eafdd0ef6d6d06237b18577f1fd8118b603b.tar drakiso-bea6eafdd0ef6d6d06237b18577f1fd8118b603b.tar.gz drakiso-bea6eafdd0ef6d6d06237b18577f1fd8118b603b.tar.bz2 drakiso-bea6eafdd0ef6d6d06237b18577f1fd8118b603b.tar.xz drakiso-bea6eafdd0ef6d6d06237b18577f1fd8118b603b.zip |
no need to use sfdisk, use DrakX partition table
-rwxr-xr-x | draklive | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -667,15 +667,13 @@ sub get_disk_master_path { } sub allocate_partition { - my ($dest, $part_idx, $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]}; + my ($dest, $part, $o_inode_size) = @_; require devices; my $loop = devices::find_free_loop(); - run_('losetup', '-o', $part_start * $common::SECTORSIZE, '-s', $part_nb_sectors * $common::SECTORSIZE, $loop, $dest) + run_('losetup', '-o', $part->{start} * $common::SECTORSIZE, '-s', $part->{size} * $common::SECTORSIZE, $loop, $dest) or die "unable to setup loop device"; - MDV::Draklive::Utils::device_mkfs($loop, $fs, $o_inode_size) or die "unable to format $dest\n"; + MDV::Draklive::Utils::device_mkfs($loop, $part->{fs_type}, $o_inode_size) or die "unable to format $dest\n"; return $loop; } @@ -715,7 +713,7 @@ sub allocate_master { partition_table::write($hd); my $inode_size = $media->get_media_setting('inode_size'); - map_index { allocate_partition($dest, $::i, $_->{fs_type}, $inode_size) } @{$media->{partitions}}; + map_index { allocate_partition($dest, $_, $inode_size) } @{$media->{partitions}}; } sub create_disk_master { |