diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-03-17 11:18:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-03-17 11:18:39 +0000 |
commit | ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa (patch) | |
tree | 53a9b6463d68d978a5cb0195aa7c2a912eb009df /perl-install | |
parent | 63a0b98ad2cd2c3c7ad61ae41efc433a60ae5c73 (diff) | |
download | drakx-backup-do-not-use-ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa.tar drakx-backup-do-not-use-ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa.tar.gz drakx-backup-do-not-use-ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa.tar.bz2 drakx-backup-do-not-use-ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa.tar.xz drakx-backup-do-not-use-ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa.zip |
- sector2CHS() now gives sector number starting at 0
- CHS2rawCHS() takes care of giving sector number starting at 1
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/partition_table/dos.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm index cb687e6b0..acbc821f2 100644 --- a/perl-install/partition_table/dos.pm +++ b/perl-install/partition_table/dos.pm @@ -41,9 +41,9 @@ sub CHS2rawCHS { #- no way to have a #cylinder >= 1024 $c = 1023; $h = $hd->{geom}{heads} - 1; - $s = $hd->{geom}{sectors}; + $s = $hd->{geom}{sectors} - 1; } - ($c & 0xff, $h, $s | (($c >> 2) & 0xc0)); + ($c & 0xff, $h, ($s + 1) | (($c >> 2) & 0xc0)); } # returns (cylinder, head, sector) @@ -52,7 +52,7 @@ sub sector2CHS { my ($s, $h); ($start, $s) = divide($start, $hd->{geom}{sectors}); ($start, $h) = divide($start, $hd->{geom}{heads}); - [ $start, $h, $s + 1 ]; + [ $start, $h, $s ]; } sub read { |