diff options
author | msmith <msmith@FreeBSD.org> | 1997-02-18 23:31:53 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1997-02-18 23:31:53 +0000 |
commit | 014c0e9ac72a91a182adcc22e6a7c70bfe5a750e (patch) | |
tree | f9e9cae29b6c5c469f56495500fde9c80e82680d /sys | |
parent | 58e2f6b9ce8f8a138a379b6ce3a1dc084ef517aa (diff) | |
download | FreeBSD-src-014c0e9ac72a91a182adcc22e6a7c70bfe5a750e.zip FreeBSD-src-014c0e9ac72a91a182adcc22e6a7c70bfe5a750e.tar.gz |
Use the same blocks->size-in-MB conversion algorithm as the SCSI code
to avoid overflowing an intermediate value for disks > 2^32 bytes
large.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/isa/wd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index 6e5823a..842a4c7 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -415,7 +415,7 @@ wdattach(struct isa_device *dvp) "wd%d: %luMB (%lu sectors), %lu cyls, %lu heads, %lu S/T, %lu B/S\n", lunit, du->dk_dd.d_secperunit - * du->dk_dd.d_secsize / (1024 * 1024), + / ((1024L * 1024L) / du->dk_dd.d_secsize), du->dk_dd.d_secperunit, du->dk_dd.d_ncylinders, du->dk_dd.d_ntracks, |