diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-08-03 11:43:48 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-08-03 11:43:48 +0000 |
commit | 60b94402d7b7f4485cb2f5f9cc144c6125c905be (patch) | |
tree | cad2a6d10ca3e973ec324d6dd002aabef7e451c5 | |
parent | 65c0e7d3faaf132d329f54bd6c958ca6e9d82a92 (diff) | |
download | draklive-60b94402d7b7f4485cb2f5f9cc144c6125c905be.tar draklive-60b94402d7b7f4485cb2f5f9cc144c6125c905be.tar.gz draklive-60b94402d7b7f4485cb2f5f9cc144c6125c905be.tar.bz2 draklive-60b94402d7b7f4485cb2f5f9cc144c6125c905be.tar.xz draklive-60b94402d7b7f4485cb2f5f9cc144c6125c905be.zip |
pass hd to be closer to DrakX
-rwxr-xr-x | draklive | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -667,18 +667,18 @@ sub get_disk_master_path { } sub get_partition_loop { - my ($dest, $part) = @_; + my ($hd, $part) = @_; require devices; my $loop = devices::find_free_loop(); - run_('losetup', '-o', $part->{start} * $common::SECTORSIZE, '-s', $part->{size} * $common::SECTORSIZE, $loop, $dest) + run_('losetup', '-o', $part->{start} * $common::SECTORSIZE, '-s', $part->{size} * $common::SECTORSIZE, $loop, $hd->{file}) or die "unable to setup loop device"; return $loop; } sub allocate_partition { - my ($dest, $part, $o_inode_size) = @_; - my $loop = get_partition_loop($dest, $part); - MDV::Draklive::Utils::device_mkfs($loop, $part->{fs_type}, $o_inode_size) or die "unable to format $dest\n"; + my ($hd, $part, $o_inode_size) = @_; + my $loop = get_partition_loop($hd, $part); + MDV::Draklive::Utils::device_mkfs($loop, $part->{fs_type}, $o_inode_size) or die "unable to format $hd->{file}\n"; return $loop; } @@ -718,7 +718,7 @@ sub allocate_master { partition_table::write($hd); my $inode_size = $media->get_media_setting('inode_size'); - map_index { allocate_partition($dest, $_, $inode_size) } @{$media->{partitions}}; + map_index { allocate_partition($hd, $_, $inode_size) } @{$media->{partitions}}; } sub create_disk_master { |