svn commit: r183805 - head/sys/dev/mmc
Alexander Motin
mav at FreeBSD.org
Sun Oct 12 19:19:27 UTC 2008
Author: mav
Date: Sun Oct 12 19:19:26 2008
New Revision: 183805
URL: http://svn.freebsd.org/changeset/base/183805
Log:
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@
Modified:
head/sys/dev/mmc/mmcsd.c
Modified: head/sys/dev/mmc/mmcsd.c
==============================================================================
--- head/sys/dev/mmc/mmcsd.c Sun Oct 12 18:49:07 2008 (r183804)
+++ head/sys/dev/mmc/mmcsd.c Sun Oct 12 19:19:26 2008 (r183805)
@@ -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;
}
More information about the svn-src-head
mailing list