diff options
author | 2021-05-21 09:21:42 -0400 | |
---|---|---|
committer | 2021-05-21 09:21:42 -0400 | |
commit | f06784df5a44c2aeb450ff88346a96f0bc9eb732 (patch) | |
tree | 49e9923a65f7cf572a6f0833737b72848299b1c8 /file_cmds/mtree/mtree.c | |
parent | 0e3bb24ea8cde1573760b88ad56c1cc00be15cc8 (diff) | |
parent | 8d788054a62508f8d1b93067be16fb73f987ca8e (diff) | |
download | apple_cmds-f06784df5a44c2aeb450ff88346a96f0bc9eb732.tar.gz apple_cmds-f06784df5a44c2aeb450ff88346a96f0bc9eb732.tar.zst apple_cmds-f06784df5a44c2aeb450ff88346a96f0bc9eb732.zip |
Merge branch 'apple'
Diffstat (limited to 'file_cmds/mtree/mtree.c')
-rw-r--r-- | file_cmds/mtree/mtree.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/file_cmds/mtree/mtree.c b/file_cmds/mtree/mtree.c index edf0cce..46cc2ae 100644 --- a/file_cmds/mtree/mtree.c +++ b/file_cmds/mtree/mtree.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD: src/usr.sbin/mtree/mtree.c,v 1.29 2004/06/04 19:29:28 ru Exp #define SECONDS_IN_A_DAY (60 * 60 * 24) int ftsoptions = FTS_PHYSICAL; -int cflag, dflag, eflag, iflag, nflag, qflag, rflag, sflag, uflag, Uflag, wflag, mflag, tflag; +int cflag, dflag, eflag, iflag, nflag, qflag, rflag, sflag, uflag, Uflag, wflag, mflag, tflag, xflag; int insert_mod, insert_birth, insert_access, insert_change, insert_parent; struct timespec ts; u_int keys; @@ -101,7 +101,7 @@ main(int argc, char *argv[]) atexit(do_cleanup); atexit(print_metrics_to_file); - while ((ch = getopt(argc, argv, "cdef:iK:k:LnPp:qrs:UuwxX:m:F:t:E:")) != -1) + while ((ch = getopt(argc, argv, "cdef:iK:k:LnPp:qrs:UuwxX:m:F:t:E:S")) != -1) switch((char)ch) { case 'c': cflag = 1; @@ -216,8 +216,10 @@ main(int argc, char *argv[]) } else { set_metrics_file(file); } - break; - + break; + case 'S': + xflag = 1; + break; case '?': default: RECORD_FAILURE(92, WARN_USAGE); @@ -279,7 +281,7 @@ main(int argc, char *argv[]) status = mtree_verifyspec(spec1); if (Uflag & (status == MISMATCHEXIT)) { status = 0; - } else { + } else if (status) { RECORD_FAILURE(100, status); } if (mflag && CFDictionaryGetCount(dict)) { @@ -296,7 +298,7 @@ static void usage(void) { (void)fprintf(stderr, -"usage: mtree [-LPUcdeinqruxw] [-f spec] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n" +"usage: mtree [-LPUScdeinqruxw] [-f spec] [-K key] [-k key] [-p path] [-s seed] [-m xml dictionary] [-t timestamp]\n" "\t[-X excludes]\n"); exit(1); } |