summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2008-10-12 19:19:26 +0000
committermav <mav@FreeBSD.org>2008-10-12 19:19:26 +0000
commiteee0889b0a457425521c3b5ac4d962efa5fdd261 (patch)
tree22dd603431a47a6f2fe84a1065052fe854bc2c66 /sys/dev
parent5a7040389c86db0ad2d78d773b39853de4282ab0 (diff)
downloadFreeBSD-src-eee0889b0a457425521c3b5ac4d962efa5fdd261.zip
FreeBSD-src-eee0889b0a457425521c3b5ac4d962efa5fdd261.tar.gz
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@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/mmc/mmcsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c
index 87ffea5..d0ea6a8 100644
--- a/sys/dev/mmc/mmcsd.c
+++ b/sys/dev/mmc/mmcsd.c
@@ -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;
}
OpenPOWER on IntegriCloud