summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-23 13:01:55 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-23 13:01:55 +0000
commit673787cbdab4a47b0b3cb987866c57704d7bdee9 (patch)
tree32255ffefd59a78b5e798e18a4f790b032449c1b /perl-install/fsedit.pm
parent57ea24fde5f61bb54bee187847f1119b5c79f9f3 (diff)
downloaddrakx-backup-do-not-use-673787cbdab4a47b0b3cb987866c57704d7bdee9.tar
drakx-backup-do-not-use-673787cbdab4a47b0b3cb987866c57704d7bdee9.tar.gz
drakx-backup-do-not-use-673787cbdab4a47b0b3cb987866c57704d7bdee9.tar.bz2
drakx-backup-do-not-use-673787cbdab4a47b0b3cb987866c57704d7bdee9.tar.xz
drakx-backup-do-not-use-673787cbdab4a47b0b3cb987866c57704d7bdee9.zip
no_comment
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index ac2126339..1cde1f847 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -174,7 +174,7 @@ sub removeFromList($$$) {
sub allocatePartitions($$) {
my ($hds, $to_add) = @_;
my %free_sectors = map { $_->{device} => [1, $_->{totalsectors} ] } @$hds; # first sector is always occupied by the MBR
- my $remove = sub { removeFromList($_[0]->{start}, $_[0]->{start} + $_[0]->{size}, $free_sectors{$_[0]->{rootDevice}}) };
+ my $remove = sub { removeFromList($_[0]{start}, $_[0]->{start} + $_[0]->{size}, $free_sectors{$_[0]->{rootDevice}}) };
my $success = 0;
foreach (get_fstab(@$hds)) { &$remove($_); }
@@ -217,6 +217,10 @@ sub undo_prepare($) {
push @{$_->{undo}}, Data::Dumper->Dump([\@h], ['$h']);
}
}
+sub undo_forget($) {
+ my ($hds) = @_;
+ pop @{$_->{undo}} foreach @$hds;
+}
sub undo($) {
my ($hds) = @_;
@@ -233,12 +237,12 @@ sub move {
my $part2 = { %$part };
$part2->{start} = $sector2;
- $part2->{size} += partition_table::cylinder_size($hd2);
+ $part2->{size} += partition_table::cylinder_size($hd2) - 1;
partition_table::remove($hd, $part);
{
local ($part2->{notFormatted}, $part2->{isFormatted}); # do not allow partition::add to change this
partition_table::add($hd2, $part2);
- }
+ }
return if $part2->{notFormatted} && !$part2->{isFormatted} || $::testing;