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.
This commit is contained in:
msmith 1997-02-18 23:31:53 +00:00
parent 58e2f6b9ce
commit 014c0e9ac7

View File

@ -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,