diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-01-13 01:42:09 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-01-13 01:42:09 +0000 |
commit | 8ff91a788713c2d1b6cf1bbc9a853da4d81c2618 (patch) | |
tree | a42fa2629d9389b5b0fd192ce15868b23a73f23e /sbin/newfs/mkfs.c | |
parent | 9acdf4e265be72d2bc2b9167b0bc4041bbee62a9 (diff) |
quiet warnings. better diff suggested by tom@ ok deraadt@
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r-- | sbin/newfs/mkfs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 76c6742464a..7bda80bf198 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkfs.c,v 1.37 2003/12/05 00:40:29 mickey Exp $ */ +/* $OpenBSD: mkfs.c,v 1.38 2004/01/13 01:42:08 tedu Exp $ */ /* $NetBSD: mkfs.c,v 1.25 1995/06/18 21:35:38 cgd Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)mkfs.c 8.3 (Berkeley) 2/3/94"; #else -static char rcsid[] = "$OpenBSD: mkfs.c,v 1.37 2003/12/05 00:40:29 mickey Exp $"; +static char rcsid[] = "$OpenBSD: mkfs.c,v 1.38 2004/01/13 01:42:08 tedu Exp $"; #endif #endif /* not lint */ @@ -384,8 +384,10 @@ recalc: */ sblock.fs_cpg = cpg; if (sblock.fs_cpg % mincpc != 0) { - printf("%s groups must have a multiple of %ld cylinders\n", - cpgflg ? "Cylinder" : "Warning: cylinder", mincpc); + if (!quiet) + printf("%s groups must have a multiple of %ld " + "cylinders\n", cpgflg ? "Cylinder" : + "Warning: cylinder", mincpc); sblock.fs_cpg = roundup(sblock.fs_cpg, mincpc); if (!cpgflg) cpg = sblock.fs_cpg; @@ -552,7 +554,7 @@ next: fssize = fsbtodb(&sblock, sblock.fs_size); warn = 0; } - if (warn && !mfs) { + if (!quiet && warn && !mfs) { printf("Warning: %d sector(s) in last cylinder unallocated\n", sblock.fs_spc - (dbtofsb(&sblock, fssize) * NSPF(&sblock) - |