aboutsummaryrefslogtreecommitdiff
path: root/findutils/find.c
diff options
context:
space:
mode:
authorPaul Fox <pgf@brightstareng.com>2007-09-06 17:45:16 +0000
committerPaul Fox <pgf@brightstareng.com>2007-09-06 17:45:16 +0000
commitdcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d (patch)
tree533890f181a0801f8dcd14237b9603522f466f34 /findutils/find.c
parentfdf9060aa3b7461c5fa653aa334a57370b5421fd (diff)
downloadbusybox-dcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d.tar.gz
fix -xdev behavior in the presence of two or more nested mount points
on the command line, e.g. "find / /boot -xdev".
Diffstat (limited to 'findutils/find.c')
-rw-r--r--findutils/find.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/findutils/find.c b/findutils/find.c
index 21584681b..f3167a083 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -383,9 +383,11 @@ static int fileAction(const char *fileName, struct stat *statbuf, void *userData
#if ENABLE_FEATURE_FIND_XDEV
if (S_ISDIR(statbuf->st_mode) && xdev_count) {
for (i = 0; i < xdev_count; i++) {
- if (xdev_dev[i] != statbuf->st_dev)
- return SKIP;
+ if (xdev_dev[i] == statbuf->st_dev)
+ break;
}
+ if (i == xdev_count)
+ return SKIP;
}
#endif
i = exec_actions(actions, fileName, statbuf);