summaryrefslogtreecommitdiff
path: root/lib/libc/gen/fts.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-10-03 19:22:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-10-03 19:22:23 +0000
commit77e53bad3c551494891f8d12464b57eddc79664b (patch)
tree6a3dff7494a20707d995abc7bdfaca19642dc013 /lib/libc/gen/fts.c
parent1b165e9f2c3ac4fe5316adc1ee1b63e78a3fbd55 (diff)
kill FTS_CHDIRROOT flag, it is broken beyond repair and no longer used
Diffstat (limited to 'lib/libc/gen/fts.c')
-rw-r--r--lib/libc/gen/fts.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index a2983891f20..26d67fff3f9 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fts.c,v 1.21 1999/10/03 19:17:31 millert Exp $ */
+/* $OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#else
-static char rcsid[] = "$OpenBSD: fts.c,v 1.21 1999/10/03 19:17:31 millert Exp $";
+static char rcsid[] = "$OpenBSD: fts.c,v 1.22 1999/10/03 19:22:22 millert Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -373,16 +373,9 @@ next: tmp = p;
* the root of the tree), and load the paths for the next root.
*/
if (p->fts_level == FTS_ROOTLEVEL) {
- if ((sp->fts_options & FTS_CHDIRROOT)) {
- if (chdir(p->fts_accpath)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
+ if (FCHDIR(sp, sp->fts_rfd)) {
+ SET(FTS_STOP);
+ return (NULL);
}
fts_load(sp, p);
return (sp->fts_cur = p);
@@ -437,16 +430,9 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
* one directory.
*/
if (p->fts_level == FTS_ROOTLEVEL) {
- if ((sp->fts_options & FTS_CHDIRROOT)) {
- if (chdir(p->fts_accpath)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
+ if (FCHDIR(sp, sp->fts_rfd)) {
+ SET(FTS_STOP);
+ return (NULL);
}
} else if (p->fts_flags & FTS_SYMFOLLOW) {
if (FCHDIR(sp, p->fts_symfd)) {