Date: Sun, 1 May 2016 02:19:49 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298871 - in head/sbin: growfs newfs_nandfs Message-ID: <201605010219.u412JnU3060064@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sun May 1 02:19:49 2016 New Revision: 298871 URL: https://svnweb.freebsd.org/changeset/base/298871 Log: sbin: use our howmany() macro when available through <sys/param.h>. Modified: head/sbin/growfs/debug.c head/sbin/newfs_nandfs/newfs_nandfs.c Modified: head/sbin/growfs/debug.c ============================================================================== --- head/sbin/growfs/debug.c Sat Apr 30 23:42:46 2016 (r298870) +++ head/sbin/growfs/debug.c Sun May 1 02:19:49 2016 (r298871) @@ -518,7 +518,8 @@ dbg_dump_frmap(struct fs *sb, const char cp = (unsigned char *)cg_blksfree(cgr); if (sb->fs_old_nspf) - e = howmany((sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf), CHAR_BIT); + e = howmany(sb->fs_old_cpg * sb->fs_old_spc / sb->fs_old_nspf, + CHAR_BIT); else e = 0; for (j = 0; j < e; j += 32) { Modified: head/sbin/newfs_nandfs/newfs_nandfs.c ============================================================================== --- head/sbin/newfs_nandfs/newfs_nandfs.c Sat Apr 30 23:42:46 2016 (r298870) +++ head/sbin/newfs_nandfs/newfs_nandfs.c Sun May 1 02:19:49 2016 (r298871) @@ -132,7 +132,7 @@ static uint32_t nuserfiles; static uint32_t seg_nblocks; static uint32_t seg_endblock; -#define SIZE_TO_BLOCK(size) (((size) + (blocksize - 1)) / blocksize) +#define SIZE_TO_BLOCK(size) howmany(size, blocksize) static uint32_t nandfs_first_block(void)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605010219.u412JnU3060064>