aboutsummaryrefslogtreecommitdiff
path: root/sbin/newfs
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-05-31 12:21:50 +0000
committerBruce Evans <bde@FreeBSD.org>1998-05-31 12:21:50 +0000
commit5a3e77d851e080568799ff337ab9ded26524c6a8 (patch)
treea7f33342785625e13ca2931c2834802fee7a83bc /sbin/newfs
parent5832a752461fa15df3e3b505205c2d9e6c3ab03f (diff)
downloadsrc-5a3e77d851e080568799ff337ab9ded26524c6a8.tar.gz
src-5a3e77d851e080568799ff337ab9ded26524c6a8.zip
Fixed overflow in the calculation of the number of inodes per group
for filesystems with almost the maximum number of sectors. The maxiumum is 2^31, but overflow is common for that size, and overflow normally occurred here at size (2^31 - 4096).
Notes
Notes: svn path=/head/; revision=36498
Diffstat (limited to 'sbin/newfs')
-rw-r--r--sbin/newfs/mkfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index c2322566a260..b21c45823db8 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -1059,7 +1059,7 @@ calcipg(cpg, bpcg, usedbp)
* Prepare to scale by fssize / (number of sectors in cylinder groups).
* Note that fssize is still in sectors, not filesystem blocks.
*/
- ncyl = howmany(fssize, secpercyl);
+ ncyl = howmany(fssize, (u_int)secpercyl);
ncg = howmany(ncyl, cpg);
/*
* Iterate a few times to allow for ipg depending on itself.