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:
parent
58e2f6b9ce
commit
014c0e9ac7
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user