diff options
author | Francois Pons <fpons@mandriva.com> | 2000-02-04 14:22:17 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-02-04 14:22:17 +0000 |
commit | 60ac60d8a763ff2c8ae64b8d4243b01a54b498ee (patch) | |
tree | 5600494716d0d1212047faa56e88610d1800a263 /perl-install/partition_table_raw.pm | |
parent | 108a6e5c4434c59ee81091df06b752af4a0e9fe7 (diff) | |
download | drakx-backup-do-not-use-60ac60d8a763ff2c8ae64b8d4243b01a54b498ee.tar drakx-backup-do-not-use-60ac60d8a763ff2c8ae64b8d4243b01a54b498ee.tar.gz drakx-backup-do-not-use-60ac60d8a763ff2c8ae64b8d4243b01a54b498ee.tar.bz2 drakx-backup-do-not-use-60ac60d8a763ff2c8ae64b8d4243b01a54b498ee.tar.xz drakx-backup-do-not-use-60ac60d8a763ff2c8ae64b8d4243b01a54b498ee.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table_raw.pm')
-rw-r--r-- | perl-install/partition_table_raw.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm index 668913d9c..e48cddce0 100644 --- a/perl-install/partition_table_raw.pm +++ b/perl-install/partition_table_raw.pm @@ -63,6 +63,7 @@ sub get_geometry($) { ioctl(F, c::HDIO_GETGEO(), $g) or return; my %geom; @geom{qw(heads sectors cylinders start)} = unpack "CCSL", $g; + $geom{totalcylinders} = $geom{cylinders}; { geom => \%geom, totalsectors => $geom{heads} * $geom{sectors} * $geom{cylinders} }; } @@ -72,8 +73,15 @@ sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; } # cause kernel to re-read partition table sub kernel_read($) { my ($hd) = @_; + sync(); local *F; openit($hd, *F) or return 0; + sync(); sleep(1); $hd->{rebootNeeded} = !ioctl(F, c::BLKRRPART(), 0); + sync(); sleep(1); + $hd->{rebootNeeded} = !ioctl(F, c::BLKRRPART(), 0); + sync(); + close F; + sync(); sleep(1); } sub zero_MBR($) { |