[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/8] maint: fts.c: remove #if-0'd FTS_WHITEOUT code
From: |
Jim Meyering |
Subject: |
[PATCH 1/8] maint: fts.c: remove #if-0'd FTS_WHITEOUT code |
Date: |
Thu, 18 Aug 2011 15:53:20 +0200 |
From: Jim Meyering <address@hidden>
---
lib/fts.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/lib/fts.c b/lib/fts.c
index 7210c1b..c96dd9d 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1233,12 +1233,6 @@ fts_build (register 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.
*/
-#if defined FTS_WHITEOUT && 0
- if (ISSET(FTS_WHITEOUT))
- oflag = DTF_NODUP|DTF_REWIND;
- else
- oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND;
-#else
# define __opendir2(file, flag) \
opendirat((! ISSET(FTS_NOCHDIR) && ISSET(FTS_CWDFD) \
? sp->fts_cwd_fd : AT_FDCWD), \
@@ -1249,7 +1243,7 @@ fts_build (register FTS *sp, int type)
? O_NOFOLLOW : 0) \
| (ISSET (FTS_NOATIME) ? O_NOATIME : 0)), \
&dir_fd)
-#endif
+
if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
if (type == BREAD) {
cur->fts_info = FTS_DNR;
@@ -1412,10 +1406,6 @@ mem1: saved_errno = errno;
p->fts_parent = sp->fts_cur;
p->fts_pathlen = new_len;
-#if defined FTS_WHITEOUT && 0
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
/* Store dirent.d_ino, in case we need to sort
entries before processing them. */
p->fts_statp->st_ino = D_INO (dp);
@@ -1690,15 +1680,6 @@ fts_stat(FTS *sp, register FTSENT *p, bool follow)
if (p->fts_level == FTS_ROOTLEVEL && ISSET(FTS_COMFOLLOW))
follow = true;
-#if defined FTS_WHITEOUT && 0
- /* check for whiteout */
- if (p->fts_flags & FTS_ISW) {
- memset(sbp, '\0', sizeof (*sbp));
- sbp->st_mode = S_IFWHT;
- return (FTS_W);
- }
-#endif
-
/*
* If doing a logical walk, or application requested FTS_FOLLOW, do
* a stat(2). If that fails, check for a non-existent symlink. If
--
1.7.6.857.gf34cf
- fts: do not exhaust memory when processing million-entry directory, Jim Meyering, 2011/08/18
- [PATCH 3/8] maint: fts.c: correct off-by-one indentation, Jim Meyering, 2011/08/18
- [PATCH 2/8] maint: fts.c: move __opendir2 #define "up" out of function body, Jim Meyering, 2011/08/18
- [PATCH 7/8] fts: move decl of "dp" into while loop; split long line, Jim Meyering, 2011/08/18
- [PATCH 5/8] maint: fts: give __opendir2 a new parameter, Jim Meyering, 2011/08/18
- [PATCH 6/8] fts: add/use new struct member, fts_dirp, Jim Meyering, 2011/08/18
- [PATCH 8/8] fts: do not exhaust memory when processing million-entry directories, Jim Meyering, 2011/08/18