diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-06-16 03:01:26 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-06-16 03:01:26 +0000 |
commit | bf930ac3892ae5c8a0837b9063ffbb7f79d6558b (patch) | |
tree | c0643e660abc6e2c9238b16fd31a84df7107106d /lib/libc/gen | |
parent | 315e4280303be979473f01a9df4563b1d5b52d88 (diff) |
bye bye whiteouts
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/fts.c | 16 | ||||
-rw-r--r-- | lib/libc/gen/opendir.c | 6 | ||||
-rw-r--r-- | lib/libc/gen/readdir.c | 4 |
3 files changed, 7 insertions, 19 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index a65dd4c5b4b..dfc634b7bd9 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.c,v 1.34 2003/06/11 21:03:10 deraadt Exp $ */ +/* $OpenBSD: fts.c,v 1.35 2005/06/16 03:01:25 millert Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -33,7 +33,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -static char rcsid[] = "$OpenBSD: fts.c,v 1.34 2003/06/11 21:03:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: fts.c,v 1.35 2005/06/16 03:01:25 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -553,7 +553,7 @@ fts_build(FTS *sp, int type) DIR *dirp; void *oldaddr; size_t len, maxlen; - int nitems, cderrno, descend, level, nlinks, oflag, nostat, doadjust; + int nitems, cderrno, descend, level, nlinks, nostat, doadjust; int saved_errno; char *cp; @@ -564,15 +564,7 @@ fts_build(FTS *sp, int type) * Open the directory for reading. If this fails, we're done. * If being called from fts_read, set the fts_info field. */ -#ifdef FTS_WHITEOUT - if (ISSET(FTS_WHITEOUT)) - oflag = DTF_NODUP|DTF_REWIND; - else - oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; -#else -#define __opendir2(path, flag) opendir(path) -#endif - if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { + if ((dirp = opendir(cur->fts_accpath)) == NULL) { if (type == BREAD) { cur->fts_info = FTS_DNR; cur->fts_errno = errno; diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c index 1c6204dc0ee..fb8f4fc600c 100644 --- a/lib/libc/gen/opendir.c +++ b/lib/libc/gen/opendir.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: opendir.c,v 1.12 2005/05/26 03:48:18 pedro Exp $"; +static char rcsid[] = "$OpenBSD: opendir.c,v 1.13 2005/06/16 03:01:25 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -66,7 +66,7 @@ DIR * opendir(const char *name) { - return (__opendir2(name, DTF_HIDEW|DTF_NODUP)); + return (__opendir2(name, DTF_NODUP)); } DIR * @@ -111,8 +111,6 @@ __opendir2(const char *name, int flags) } dirp->dd_seek = 0; - flags &= ~DTF_REWIND; - dirp->dd_loc = 0; dirp->dd_fd = fd; dirp->dd_flags = flags; diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c index 59a129deae1..73859cc3633 100644 --- a/lib/libc/gen/readdir.c +++ b/lib/libc/gen/readdir.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: readdir.c,v 1.8 2005/03/25 15:38:47 otto Exp $"; +static char rcsid[] = "$OpenBSD: readdir.c,v 1.9 2005/06/16 03:01:25 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -66,8 +66,6 @@ readdir(DIR *dirp) dirp->dd_loc += dp->d_reclen; if (dp->d_ino == 0) continue; - if (dp->d_type == DT_WHT && (dirp->dd_flags & DTF_HIDEW)) - continue; return (dp); } } |