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:
Mike Smith 1997-02-18 23:31:53 +00:00
parent 377a4b0779
commit a7d3b81100
1 changed files with 1 additions and 1 deletions

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,