diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-08 18:37:57 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2002-10-08 18:37:57 -0700 |
| commit | 899567251548f09a5f43113a4a759925720ded99 (patch) | |
| tree | 6a794aea177aa256659b22dfb3e9cad2216c4d66 /include/linux/devfs_fs_kernel.h | |
| parent | a2b12f37e6f3f10072899db6e30b9a08d8588459 (diff) | |
[PATCH] Fix xxx_get_biosgeometry --- avoid useless 64-bit division.
From Peter Chubb
The bios geometry is almost useless, except for fdisk to try to write
an MSDOS partition table that is vaguely compatible with one written by
other operating systems.
If the size of disc will overflow a ten-bit cylinder number, then all
bets are off anyway. So fake it by casting the true disc capacity to a
smaller type (than u64), so that we avoid 64-bit division on 32-bit
platforms. If the disc is small enough that the number of cylinders is
correct, then this has no effect; otherwise, the number-of-cylinders we
report is bogus, but you can't use an MSDOS-format partition table on
such a drive anyway --- use the EFI GPT or the LDM partitioning, which
use 64-bit offsets internally.
Diffstat (limited to 'include/linux/devfs_fs_kernel.h')
0 files changed, 0 insertions, 0 deletions
