diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-10-19 11:27:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-10-19 11:27:07 +0000 |
commit | db4d234060d0f6ab18d6252ff1f9bd2329560b72 (patch) | |
tree | d3c7a19e01cbe59c007c6b2dd8cb0ab405383154 | |
parent | ec8a108435108236cf22f96934e10b2122f261f8 (diff) | |
download | drakx-backup-do-not-use-db4d234060d0f6ab18d6252ff1f9bd2329560b72.tar drakx-backup-do-not-use-db4d234060d0f6ab18d6252ff1f9bd2329560b72.tar.gz drakx-backup-do-not-use-db4d234060d0f6ab18d6252ff1f9bd2329560b72.tar.bz2 drakx-backup-do-not-use-db4d234060d0f6ab18d6252ff1f9bd2329560b72.tar.xz drakx-backup-do-not-use-db4d234060d0f6ab18d6252ff1f9bd2329560b72.zip |
- raw_add, can_raw_add moved to partition_table_raw
- using raw_removed
-rw-r--r-- | perl-install/partition_table.pm | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index b2c779964..350431870 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -594,6 +594,7 @@ sub remove { splice(@{$hd->{primary}{normal}}, $i, 1); %$_ = (); #- blank it + $hd->raw_removed($hd->{primary}{raw}); return $hd->{isDirty} = $hd->{needKernelReread} = 1; } $i++; @@ -624,7 +625,7 @@ sub add_primary { local $hd->{primary}{normal}; #- save it to fake an addition of $part, that way add_primary do not modify $hd if it fails push @{$hd->{primary}{normal}}, $part; adjust_main_extended($hd); #- verify - raw_add($hd->{primary}{raw}, $part); + $hd->raw_add($hd->{primary}{raw}, $part); } push @{$hd->{primary}{normal}}, $part; #- really do it } @@ -668,7 +669,7 @@ The only solution is to move your primary partitions to have the hole next to th (top(@{$hd->{extended}}), $part->{size}); my %ext = ( type => $extended_type || 5, start => $part->{start}, size => $ext_size ); - raw_add($ext->{raw}, \%ext); + $hd->raw_add($ext->{raw}, \%ext); $ext->{extended} = \%ext; push @{$hd->{extended}}, { %ext, raw => [ $part, {}, {}, {} ], normal => $part }; } @@ -725,22 +726,6 @@ sub next_start { $next ? $next->{start} : $hd->{totalsectors}; } -sub can_raw_add { - my ($hd) = @_; - $_->{size} || $_->{type} or return 1 foreach @{$hd->{primary}{raw}}; - 0; -} -sub raw_add { - my ($raw, $part) = @_; - - foreach (@$raw) { - $_->{size} || $_->{type} and next; - $_ = $part; - return; - } - die "raw_add: partition table already full"; -} - sub load { my ($hd, $file, $force) = @_; |