summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-09-11 22:55:54 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-09-11 22:55:54 -0400
commit4f80c17192f2b28c96a489969d4435151d68d0ce (patch)
tree07dc1ca26a45c382578b80a6e0bcb85b50d27a2f /parse.c
parent7b6bbf9a65226f2c37a15a05f9185b32d51355f7 (diff)
downloadbfs-4f80c17192f2b28c96a489969d4435151d68d0ce.tar.xz
parse: Don't treat -mount differently from -xdev yet
The new POSIX version with -mount isn't out yet, so there's no point in conforming to a non-existent document while breaking compatibility with GNU find, which hasn't changed yet either. But a warning is added for the future incompatibility. This patch can be reverted to re-enable the feature.
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index b0b8167..0ea40c5 100644
--- a/parse.c
+++ b/parse.c
@@ -1543,7 +1543,14 @@ static struct expr *parse_ls(struct parser_state *state, int arg1, int arg2) {
* Parse -mount.
*/
static struct expr *parse_mount(struct parser_state *state, int arg1, int arg2) {
- state->cmdline->flags |= BFTW_MOUNT;
+ if (state->warn) {
+ parse_warning(state,
+ "In the future, %s will skip mount points entirely, unlike\n"
+ "-xdev, due to http://austingroupbugs.net/view.php?id=1133.\n\n",
+ state->argv[0]);
+ }
+
+ state->cmdline->flags |= BFTW_XDEV;
state->mount_arg = state->argv[0];
return parse_nullary_option(state);
}