diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-10-07 11:51:12 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-10-07 11:51:12 +0000 |
commit | 336ffce3a8a2e8e6d2a46188915b7fd3d5e732e5 (patch) | |
tree | d49803cce4a3a04673a2c961e970ed718833b072 | |
parent | 8fa2425c76033bb44d617381f47f0af937b1e5bb (diff) |
Show number of sectors, not the number of 512-byte blocks, when
saying "n sectors of m bytes".
Issue pointed out by David Vasek on misc@. Thanks!
-rw-r--r-- | sbin/newfs/mkfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index eea26a768bb..a42015b89c6 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkfs.c,v 1.79 2013/10/06 21:50:23 krw Exp $ */ +/* $OpenBSD: mkfs.c,v 1.80 2013/10/07 11:51:11 krw Exp $ */ /* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */ /* @@ -490,7 +490,8 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo, mode_t mfsmode, #define B2MBFACTOR (1 / (1024.0 * 1024.0)) printf("%s: %.1fMB in %jd sectors of %lld bytes\n", fsys, (float)sblock.fs_size * sblock.fs_fsize * B2MBFACTOR, - (intmax_t)fsbtodb(&sblock, sblock.fs_size), sectorsize); + (intmax_t)fsbtodb(&sblock, sblock.fs_size) / + (sectorsize / DEV_BSIZE), sectorsize); printf("%d cylinder groups of %.2fMB, %d blocks, %d" " inodes each\n", sblock.fs_ncg, (float)sblock.fs_fpg * sblock.fs_fsize * B2MBFACTOR, |