aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mtree/mtree.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2000-07-25 19:05:09 +0000
committerWarner Losh <imp@FreeBSD.org>2000-07-25 19:05:09 +0000
commitc96eb6d2e815d0e293e03919014bd08868d9dc73 (patch)
tree19f6537a2eeecbd597fe865e3176352f48964921 /usr.sbin/mtree/mtree.c
parentda010626df7e62a562c36f5315b625913dd65bdc (diff)
downloadsrc-c96eb6d2e815d0e293e03919014bd08868d9dc73.tar.gz
src-c96eb6d2e815d0e293e03919014bd08868d9dc73.zip
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
Notes
Notes: svn path=/head/; revision=63853
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 aa3d1ea775d6..d16771e9c7ab 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);
}