summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/mtree.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-07-16 07:55:07 +0000
committerache <ache@FreeBSD.org>2000-07-16 07:55:07 +0000
commitcf90e1b59591af15eaed07fedb9e1acadef22874 (patch)
tree0f22b3a302ac6890de2790b4c363294251845696 /usr.sbin/mtree/mtree.c
parentf045b6ecd23b883f4730d69ea92027e1cd185aa8 (diff)
downloadFreeBSD-src-cf90e1b59591af15eaed07fedb9e1acadef22874.zip
FreeBSD-src-cf90e1b59591af15eaed07fedb9e1acadef22874.tar.gz
Revert back to original mtree default behaviour to not follow symlinks, to be
compatible with other *BSD camp. Add -L option to follow symlinks, so remove -P option which is now default. The next step will be to add -L to building process. Asked-by: bde
Diffstat (limited to 'usr.sbin/mtree/mtree.c')
-rw-r--r--usr.sbin/mtree/mtree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c
index b994cd2..4a49ccb 100644
--- a/usr.sbin/mtree/mtree.c
+++ b/usr.sbin/mtree/mtree.c
@@ -57,7 +57,7 @@ static const char rcsid[] =
extern long int crc_total;
-int ftsoptions = FTS_LOGICAL;
+int ftsoptions = FTS_PHYSICAL;
int cflag, dflag, eflag, iflag, nflag, rflag, sflag, uflag, Uflag;
u_int keys;
char fullpath[MAXPATHLEN];
@@ -106,16 +106,16 @@ main(argc, argv)
if (*p != '\0')
keys |= parsekey(p, NULL);
break;
+ case 'L':
+ ftsoptions &= ~FTS_PHYSICAL;
+ ftsoptions |= FTS_LOGICAL;
+ break;
case 'n':
nflag = 1;
break;
case 'p':
dir = optarg;
break;
- case 'P':
- ftsoptions ^= FTS_LOGICAL;
- ftsoptions |= FTS_PHYSICAL;
- break;
case 'r':
rflag = 1;
break;
@@ -167,7 +167,7 @@ static void
usage()
{
(void)fprintf(stderr,
-"usage: mtree [-cdeinrUux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
+"usage: mtree [-cdeiLnrUux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n"
"\t[-X excludes]\n");
exit(1);
}
OpenPOWER on IntegriCloud