summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/mtree.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2000-07-25 19:05:09 +0000
committerimp <imp@FreeBSD.org>2000-07-25 19:05:09 +0000
commit054be419e85a7a245c93d61488067c0cc308fa50 (patch)
treed14b98fb71dd3f0ea3f82ecb7e3a791b254f65a4 /usr.sbin/mtree/mtree.c
parent044c01152e7b427b706e5e96b420adbdd2d806c8 (diff)
downloadFreeBSD-src-054be419e85a7a245c93d61488067c0cc308fa50.zip
FreeBSD-src-054be419e85a7a245c93d61488067c0cc308fa50.tar.gz
Add -q. this will cause the warning messages about missing
directories to not be printed. This is from OpenBSD (and I think NetBSD also) and makes our mtree more compatible with other BSDs. This makes cross compilation easier than it was before. Other changes will be needed to allow NetBSD or OpenBSD to cross build on FreeBSD, but this is a start. Reviewed by: andrey Obtained from: OpenBSD Concentric Red Circles by: My own stupidity
Diffstat (limited to 'usr.sbin/mtree/mtree.c')
-rw-r--r--usr.sbin/mtree/mtree.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c
index aa3d1ea..d16771e 100644
--- a/usr.sbin/mtree/mtree.c
+++ b/usr.sbin/mtree/mtree.c
@@ -58,7 +58,7 @@ static const char rcsid[] =
extern long int crc_total;
int ftsoptions = FTS_LOGICAL;
-int cflag, dflag, eflag, iflag, nflag, rflag, sflag, uflag, Uflag;
+int cflag, dflag, eflag, iflag, nflag, qflag, rflag, sflag, uflag, Uflag;
u_int keys;
char fullpath[MAXPATHLEN];
@@ -112,6 +112,9 @@ main(argc, argv)
case 'p':
dir = optarg;
break;
+ case 'q':
+ qflag = 1;
+ break;
case 'P':
ftsoptions ^= FTS_LOGICAL;
ftsoptions |= FTS_PHYSICAL;
@@ -167,7 +170,7 @@ static void
usage()
{
(void)fprintf(stderr,
-"usage: mtree [-PUcdeinrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
+"usage: mtree [-PUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
"\t[-X excludes]\n");
exit(1);
}
OpenPOWER on IntegriCloud