diff options
author | ache <ache@FreeBSD.org> | 2000-09-25 16:24:22 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2000-09-25 16:24:22 +0000 |
commit | 4de572eae87dbe20fd4bfddb82b3f1d6ff2d5c0b (patch) | |
tree | 379bbceed26264a836798c7de8e3797ba687086c /usr.sbin/mtree | |
parent | c2ae01d2e9194f6a0c8ce1d9795c7cfe665c3203 (diff) | |
download | FreeBSD-src-4de572eae87dbe20fd4bfddb82b3f1d6ff2d5c0b.zip FreeBSD-src-4de572eae87dbe20fd4bfddb82b3f1d6ff2d5c0b.tar.gz |
Re-add -P option (for POSIX-like command line interface)
Diffstat (limited to 'usr.sbin/mtree')
-rw-r--r-- | usr.sbin/mtree/mtree.8 | 9 | ||||
-rw-r--r-- | usr.sbin/mtree/mtree.c | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/mtree/mtree.8 b/usr.sbin/mtree/mtree.8 index 06e0eb8..fae66e8 100644 --- a/usr.sbin/mtree/mtree.8 +++ b/usr.sbin/mtree/mtree.8 @@ -40,7 +40,7 @@ .Nd map a directory hierarchy .Sh SYNOPSIS .Nm mtree -.Op Fl LUcdeinqrux +.Op Fl LPUcdeinqrux .Bk -words .Op Fl f Ar spec .Ek @@ -71,9 +71,10 @@ missing from either the file hierarchy or the specification. The options are as follows: .Bl -tag -width flag .It Fl L -Follow all symbolic links in the file hierarchy (by default -.Nm -considers the symbolic link itself). +Follow all symbolic links in the file hierarchy. +.It Fl P +Don't follow symbolic links in the file hierarchy, instead consider +the symbolic link itself in any comparisons. This is the default. .It Fl U Modify the owner, group and permissions of existing files to match the specification and create any missing directories or symbolic links. diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index 2aa4c51..331e669 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -77,7 +77,7 @@ main(argc, argv) keys = KEYDEFAULT; init_excludes(); - while ((ch = getopt(argc, argv, "cdef:iK:k:Lnp:qrs:UuxX:")) != -1) + while ((ch = getopt(argc, argv, "cdef:iK:k:LnPp:qrs:UuxX:")) != -1) switch((char)ch) { case 'c': cflag = 1; @@ -113,6 +113,10 @@ main(argc, argv) case 'n': nflag = 1; break; + case 'P': + ftsoptions &= ~FTS_LOGICAL; + ftsoptions |= FTS_PHYSICAL; + break; case 'p': dir = optarg; break; @@ -170,7 +174,7 @@ static void usage() { (void)fprintf(stderr, -"usage: mtree [-LUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n" +"usage: mtree [-LPUcdeinqrux] [-f spec] [-K key] [-k key] [-p path] [-s seed]\n" "\t[-X excludes]\n"); exit(1); } |