summaryrefslogtreecommitdiff
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-10-07 20:14:55 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-10-07 20:14:55 +0000
commiteaa2c42ed72b8046c290be7c7427755e22dbe9a1 (patch)
treed9774e2ab06a9ce2c6d6f8249de7fa50939fab98 /sbin/newfs/newfs.c
parent49fc828d6c9df7c44224d047c97c798bfbf99a37 (diff)
better guess for ncyls. allows chuck yerkes to make small file systems again.
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r--sbin/newfs/newfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index f1ae1e7065b..eaae917820d 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.44 2003/07/16 18:02:36 tedu Exp $ */
+/* $OpenBSD: newfs.c,v 1.45 2003/10/07 20:14:54 tedu Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)newfs.c 8.8 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: newfs.c,v 1.44 2003/07/16 18:02:36 tedu Exp $";
+static char rcsid[] = "$OpenBSD: newfs.c,v 1.45 2003/10/07 20:14:54 tedu Exp $";
#endif
#endif /* not lint */
@@ -587,8 +587,8 @@ havelabel:
pp->p_size *= blkpersec;
}
ncyls = fssize / secpercyl;
- if (ncyls == 0)
- ncyls = 1;
+ if (ncyls < 2)
+ ncyls = 2;
if (cpg == 0)
cpg = DESCPG < ncyls ? DESCPG : ncyls;
else if (cpg > ncyls) {