summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-07-15 14:58:15 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-07-15 14:58:15 +0000
commite4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999 (patch)
tree4b2d6c4b02fdfb534e1eaa2ffb44426cb0fc148b /perl-install/partition_table.pm
parent39b51c96e54f880be2d2fb909f44118a6c209d7c (diff)
downloaddrakx-backup-do-not-use-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar
drakx-backup-do-not-use-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.gz
drakx-backup-do-not-use-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.bz2
drakx-backup-do-not-use-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.tar.xz
drakx-backup-do-not-use-e4fb0c6d7fbe0fc8f8659f0d39510aad4dc95999.zip
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm15
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})) {