[RFC] DT_WHT

Rical Jasan ricaljasan@pacific.net
Wed Feb 21 10:49:00 GMT 2018


There is one undocumented DT_* macro in manual/filesys.texi: DT_WHT.  It
is defined in dirent/dirent.h and appears to be used once in io/fts.c:

#if defined FTS_WHITEOUT && 0
                if (dp->d_type == DT_WHT)
                        p->fts_flags |= FTS_ISW;
#endif

For an entry in the manual, I was thinking something along the lines of:

"This macro is obsolete and has no effect.  It was used to..."

but I'm not sure what to say about what it was used for.

Alternatively, could/should it be removed?  It looks like that might
extend beyond just DT_WHT, as FTS_WHITEOUT also appears to be a NOOP:

$ grep -rFn FTS_WHITEOUT .
./io/fts.h:75:#define FTS_WHITEOUT	0x0080		/* return whiteout information */
./io/fts.c:628:#if defined FTS_WHITEOUT && 0
./io/fts.c:629:	if (ISSET(FTS_WHITEOUT))
./io/fts.c:772:#if defined FTS_WHITEOUT && 0
./io/fts.c:881:#if defined FTS_WHITEOUT && 0

Lastly, I can't find a reference to it in any of the standards I've
managed to obtain so far (not to say that's exhaustive at all).  Is this
also BSD?

Thank you,
Rical



More information about the Libc-alpha mailing list