summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-15 11:27:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-15 11:27:12 +0000
commita0092a3d667863341339645f5d0bc9bc4b4b5108 (patch)
treed9a24e421b0ed945ff3d3bced57634cd68e5776f /perl-install/partition_table
parent28a23a084b62594b9acf2d0f4d2dd3e7dad60ed8 (diff)
downloaddrakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar
drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.gz
drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.bz2
drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.xz
drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.zip
- remove the use of BLKRRPART (telling the kernel to re-read the partition table) in most cases
- replace with tell_kernel() and will_tell_kernel() - correctly handle in standalone the need to reboot, with no way to forget it (telling the WM to quit nicely then call reboot when it's done)
Diffstat (limited to 'perl-install/partition_table')
-rw-r--r--perl-install/partition_table/raw.pm18
1 files changed, 3 insertions, 15 deletions
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 5713e69d6..d8bcf8954 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -113,18 +113,6 @@ sub openit {
my $F; sysopen($F, $hd->{file}, $o_mode || 0) && $F;
}
-# cause kernel to re-read partition table
-sub kernel_read($) {
- my ($hd) = @_;
- common::sync();
- my $F = openit($hd) or return 0;
- common::sync(); sleep(1);
- $hd->{rebootNeeded} = !ioctl($F, c::BLKRRPART(), 0);
- common::sync();
- close $F;
- common::sync(); sleep(1);
-}
-
sub raw_removed {
my ($_hd, $_raw) = @_;
}
@@ -157,10 +145,10 @@ sub zero_MBR {
}
sub zero_MBR_and_dirty {
- my ($hd) = @_;
+ my ($hd) = @_;
+ my @parts = (partition_table::get_normal_parts($hd), if_($hd->{primary}{extended}, $hd->{primary}{extended}));
+ partition_table::will_tell_kernel($hd, del => $_) foreach @parts;
zero_MBR($hd);
- $hd->{isDirty} = $hd->{needKernelReread} = 1;
-
}
#- ugly stuff needed mainly for Western Digital IDE drives