summaryrefslogtreecommitdiff
path: root/lib/fts_.h
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2012-11-18 04:40:18 +0400
committerJim Meyering <jim@meyering.net>2012-11-17 17:02:23 -0800
commitfd9f1acededd74f8cd095e657528aa8fad183536 (patch)
tree1faee8e5a49d4c36bfb89fe8b6ec7aa0fb2ab907 /lib/fts_.h
parent26c0590f06332c3a2f3e7e12a96f19a58f723fe2 (diff)
downloadgnulib-fd9f1acededd74f8cd095e657528aa8fad183536.tar.gz
fts: introduce FTS_VERBATIM
This gives clients the option to disable stripping of trailing slashes from input path names during fts_open initialization. The recent change v0.0-7611-g3a9002d that made fts_open strip trailing slashes from input path names had a negative impact on findutils that relies on the old fts_open behavior to implement POSIX requirement that each path operand of the find utility shall be evaluated unaltered as it was provided, including all trailing slash characters. * lib/fts_.h (FTS_VERBATIM): New bit flag. (FTS_OPTIONMASK, FTS_NAMEONLY, FTS_STOP): Adjust. * lib/fts.c (fts_open): Honor it.
Diffstat (limited to 'lib/fts_.h')
-rw-r--r--lib/fts_.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/fts_.h b/lib/fts_.h
index 529403979f..73d29d3f72 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -145,10 +145,14 @@ typedef struct {
# define FTS_NOATIME 0x0800 /* use O_NOATIME during traversal */
-# define FTS_OPTIONMASK 0x0fff /* valid user option mask */
+ /* Use this flag to disable stripping of trailing slashes
+ from input path names during fts_open initialization. */
+# define FTS_VERBATIM 0x1000
-# define FTS_NAMEONLY 0x1000 /* (private) child names only */
-# define FTS_STOP 0x2000 /* (private) unrecoverable error */
+# define FTS_OPTIONMASK 0x1fff /* valid user option mask */
+
+# define FTS_NAMEONLY 0x2000 /* (private) child names only */
+# define FTS_STOP 0x4000 /* (private) unrecoverable error */
int fts_options; /* fts_open options, global flags */
/* Map a directory's device number to a boolean. The boolean is