git: 413e5dca9dc5 - stable/13 - fts: Move private flags away from public ones.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 21 Apr 2025 17:41:13 UTC
The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=413e5dca9dc5e0c638f79e0904efbeaf38e6037c commit 413e5dca9dc5e0c638f79e0904efbeaf38e6037c Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2025-04-10 11:34:41 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2025-04-20 08:00:24 +0000 fts: Move private flags away from public ones. Renumber the private flags so there is a sizeable gap between them and the public flags, making it easier to add public flags in the future. These private flags are only ever set or read by FTS itself, so there is no compatibility issue. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D49711 (cherry picked from commit 80e06d621ac545ac0a69d4e95e7392be38013a78) --- include/fts.h | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/include/fts.h b/include/fts.h index 6c6a30e2d8c5..cf846d1b9238 100644 --- a/include/fts.h +++ b/include/fts.h @@ -48,18 +48,22 @@ typedef struct { int (*fts_compar) /* compare function */ (const struct _ftsent * const *, const struct _ftsent * const *); -#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */ -#define FTS_LOGICAL 0x002 /* logical walk */ -#define FTS_NOCHDIR 0x004 /* don't change directories */ -#define FTS_NOSTAT 0x008 /* don't get stat info */ -#define FTS_PHYSICAL 0x010 /* physical walk */ -#define FTS_SEEDOT 0x020 /* return dot and dot-dot */ -#define FTS_XDEV 0x040 /* don't cross devices */ -#define FTS_WHITEOUT 0x080 /* return whiteout information */ -#define FTS_OPTIONMASK 0x0ff /* valid user option mask */ - -#define FTS_NAMEONLY 0x100 /* (private) child names only */ -#define FTS_STOP 0x200 /* (private) unrecoverable error */ +/* valid for fts_open() */ +#define FTS_COMFOLLOW 0x000001 /* follow command line symlinks */ +#define FTS_LOGICAL 0x000002 /* logical walk */ +#define FTS_NOCHDIR 0x000004 /* don't change directories */ +#define FTS_NOSTAT 0x000008 /* don't get stat info */ +#define FTS_PHYSICAL 0x000010 /* physical walk */ +#define FTS_SEEDOT 0x000020 /* return dot and dot-dot */ +#define FTS_XDEV 0x000040 /* don't cross devices */ +#define FTS_WHITEOUT 0x000080 /* return whiteout information */ +#define FTS_OPTIONMASK 0x0000ff /* valid user option mask */ + +/* valid only for fts_children() */ +#define FTS_NAMEONLY 0x000100 /* child names only */ + +/* internal use only */ +#define FTS_STOP 0x010000 /* unrecoverable error */ int fts_options; /* fts_open options, global flags */ void *fts_clientptr; /* thunk for sort function */ } FTS;