diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-07-15 14:58:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-07-15 14:58:15 +0000 |
commit | e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999 (patch) | |
tree | 4b2d6c4b02fdfb534e1eaa2ffb44426cb0fc148b /perl-install/partition_table.pm | |
parent | 39b51c96e54f880be2d2fb909f44118a6c209d7c (diff) | |
download | drakx-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar drakx-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.gz drakx-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.bz2 drakx-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.xz drakx-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index d4c8b2484..3ebd47122 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -168,7 +168,7 @@ sub read($;$) { $hd->{primary} = $pt; $hd->{extended} = undef; - $clearall and return $hd->{isDirty} = 1; + $clearall and return $hd->{isDirty} = $hd->{needKernelReread} = 1; my @l = (@{$pt->{normal}}, $pt->{extended}); foreach my $i (@l) { foreach (@l) { @@ -226,8 +226,11 @@ sub write($) { $hd->{isDirty} = 0; # now sync disk and re-read the partition table - sync(); - partition_table_raw::kernel_read($hd); + if ($hd->{needKernelReread}) { + sync(); + partition_table_raw::kernel_read($hd); + $hd->{needKernelReread} = 0; + } } sub active($$) { @@ -249,7 +252,7 @@ sub remove($$) { splice(@{$hd->{primary}->{normal}}, $i, 1); %$_ = (); - return $hd->{isDirty} = 1; + return $hd->{isDirty} = $hd->{needKernelReread} = 1; } $i++; } @@ -260,7 +263,7 @@ sub remove($$) { %{$last->{extended}} = $_->{extended} ? %{$_->{extended}} : (); splice(@{$hd->{extended}}, $i, 1); - return $hd->{isDirty} = 1; + return $hd->{isDirty} = $hd->{needKernelReread} = 1; } $last = $_; $i++; @@ -276,7 +279,7 @@ sub add($$) { $part->{notFormatted} = 1; $part->{isFormatted} = 0; $part->{rootDevice} = $hd->{device}; - $hd->{isDirty} = 1; + $hd->{isDirty} = $hd->{needKernelReread} = 1; adjustStartAndEnd($hd, $part); if (is_empty_array_ref($hd->{primary}->{normal})) { |