Use GB suffix only from 10GB instead of 1GB.
There are lot of cards with uneven sizes and too strong rounding will lead to very significant rounding errors. Reviewed by: imp@
This commit is contained in:
parent
f79232a7ff
commit
58bb626051
@ -148,7 +148,7 @@ mmcsd_attach(device_t dev)
|
||||
*/
|
||||
mb = d->d_mediasize >> 20; /* 1MiB == 1 << 20 */
|
||||
unit = 'M';
|
||||
if (mb > 1024) { /* 1GiB = 1024 MiB */
|
||||
if (mb >= 10240) { /* 1GiB = 1024 MiB */
|
||||
unit = 'G';
|
||||
mb /= 1024;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user