From eee0889b0a457425521c3b5ac4d962efa5fdd261 Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 12 Oct 2008 19:19:26 +0000 Subject: 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@ --- sys/dev/mmc/mmcsd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/mmc') 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; } -- cgit v1.1