summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2015-06-01 22:18:58 +0000
committerPascal Terjan <pterjan@gmail.com>2015-06-03 22:59:57 +0000
commit765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed (patch)
treeb67392b9dee275ce04dcd748305c64fa9b3dde8e /perl-install/fsedit.pm
parentb6e862baada2150b90964a79fca55c2b36924b9d (diff)
downloaddrakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.gz
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.bz2
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.tar.xz
drakx-765b1e22ea39a0fb32000e77a6c7f0fe116cd9ed.zip
only use current disk when auto partitioning, wiping disk, using free space (mga#16055)
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 2e7e0d2d7..ddae28481 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -518,12 +518,13 @@ sub add {
}
sub allocatePartitions {
- my ($all_hds, $to_add) = @_;
+ my ($all_hds, $to_add, $o_hd) = @_;
my @to_add = @$to_add;
foreach my $part_ (fs::get::holes($all_hds, 'non_readonly')) {
my ($start, $size, $dev) = @$part_{"start", "size", "rootDevice"};
+ next if $o_hd && (($o_hd->{device} || $o_hd->{VG_name}) ne $dev);
my ($part, $suggested);
while ($suggested = suggest_part($part = { start => $start, size => 0, maxsize => $size, rootDevice => $dev },
$all_hds, \@to_add)) {
@@ -537,11 +538,11 @@ sub allocatePartitions {
}
sub auto_allocate {
- my ($all_hds, $o_suggestions) = @_;
+ my ($all_hds, $o_suggestions, $o_target) = @_;
my $before = listlength(fs::get::fstab($all_hds));
my $suggestions = $o_suggestions || $suggestions{simple};
- allocatePartitions($all_hds, $suggestions);
+ allocatePartitions($all_hds, $suggestions, $o_target);
if ($o_suggestions) {
auto_allocate_raids($all_hds, $suggestions);