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:
Alexander Motin 2008-10-12 19:19:26 +00:00
parent f79232a7ff
commit 58bb626051

View File

@ -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;
}