|
|
Message-ID: <20261118125553.9133-14-ilt@envs.net>
Date: Wed, 18 Nov 2026 15:49:55 +0300
From: illiliti <ilt@...s.net>
To: musl@...ts.openwall.com
Cc: illiliti <ilt@...s.net>
Subject: [PATCH v1 13/18] fts: drop FTS_WHITEOUT support
---
src/misc/fts.c | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)
diff --git a/src/misc/fts.c b/src/misc/fts.c
index 3c49debc..aecfa9aa 100644
--- a/src/misc/fts.c
+++ b/src/misc/fts.c
@@ -84,10 +84,6 @@ static int fts_safe_changedir(const FTS *, const FTSENT *, int,
#define BNAMES 2 /* fts_children, names only */
#define BREAD 3 /* fts_read */
-#ifndef DTF_HIDEW
-#undef FTS_WHITEOUT
-#endif
-
FTS *
fts_open(char * const *argv, int options,
int (*compar)(const FTSENT **, const FTSENT **))
@@ -588,9 +584,6 @@ fts_build(FTS *sp, int type)
size_t dnamlen;
int cderrno, descend, level, nlinks, saved_errno, nostat, doadjust;
size_t len, maxlen;
-#ifdef FTS_WHITEOUT
- int oflag;
-#endif
char *cp = NULL; /* pacify gcc */
/* Set current node pointer. */
@@ -600,15 +593,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;
@@ -754,11 +739,6 @@ mem1: saved_errno = errno;
p->fts_pathlen = ftsent_pathlen_truncate(len + dnamlen);
p->fts_parent = sp->fts_cur;
-#ifdef FTS_WHITEOUT
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
-
if (cderrno) {
if (nlinks) {
p->fts_info = FTS_NS;
@@ -862,17 +842,6 @@ fts_stat(FTS *sp, FTSENT *p, int follow)
/* If user needs stat info, stat buffer already allocated. */
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-#ifdef FTS_WHITEOUT
- /* check for whiteout */
- if (p->fts_flags & FTS_ISW) {
- if (sbp != &sb) {
- 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
--
2.55.0
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.