summaryrefslogtreecommitdiff
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-05-18 19:08:17 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-05-18 19:08:17 +0000
commit2569a0e5f59f73e1671e575fbf7cbc495e991559 (patch)
treeee29ed17c7a96c8310d7990334ecda0bb0faa0d1 /sbin/newfs/newfs.c
parent4b7609c1336009809d34f52bd71cbb1b75c63cd4 (diff)
The unit of the -c options is fragments, so adjust man page and
variable name; correct the loop packing more inodes into the cg: in some cases it could put more fragments into the cg than requested; give an error if the -c option cannot be honoured. ok millert@ pedro@
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r--sbin/newfs/newfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 4c667e1413c..7d6a24c9c76 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.60 2007/05/15 09:35:47 thib Exp $ */
+/* $OpenBSD: newfs.c,v 1.61 2007/05/18 19:08:16 otto Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -116,7 +116,7 @@ int sectorsize; /* bytes/sector */
int realsectorsize; /* bytes/sector in hardware */
int fsize = 0; /* fragment size */
int bsize = 0; /* block size */
-int maxblkspercg = INT_MAX; /* maximum blocks per cylinder group */
+int maxfrgspercg = INT_MAX; /* maximum fragments per cylinder group */
int minfree = MINFREE; /* free space threshold */
int opt = DEFAULTOPT; /* optimization preference (space or time) */
int reqopt = -1; /* opt preference has not been specified */
@@ -205,9 +205,9 @@ main(int argc, char *argv[])
fatal("block size is %s: %s", errstr, optarg);
break;
case 'c':
- maxblkspercg = strtonum(optarg, 1, INT_MAX, &errstr);
+ maxfrgspercg = strtonum(optarg, 1, INT_MAX, &errstr);
if (errstr)
- fatal("blocks per cylinder group is %s: %s",
+ fatal("fragments per cylinder group is %s: %s",
errstr, optarg);
break;
case 'e':
@@ -668,7 +668,7 @@ usage(void)
} else {
fprintf(stderr,
"usage: %s [-Nq] [-b block-size] "
- "[-c blocks-per-cylinder-group] [-e maxbpg]\n"
+ "[-c fragments-per-cylinder-group] [-e maxbpg]\n"
"\t[-f frag-size] [-g avgfilesize] [-h avgfpdir] [-i bytes]\n"
"\t[-m free-space] [-O filesystem-format] [-o optimization]\n"
"\t[-S sector-size] [-s size] [-t fstype] special\n",