diff options
author | Paul Fox <pgf@brightstareng.com> | 2007-09-06 17:45:16 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2007-09-06 17:45:16 +0000 |
commit | dcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d (patch) | |
tree | 533890f181a0801f8dcd14237b9603522f466f34 | |
parent | fdf9060aa3b7461c5fa653aa334a57370b5421fd (diff) | |
download | busybox-w32-dcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d.tar.gz busybox-w32-dcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d.tar.bz2 busybox-w32-dcf9bba3b76cc1b79d9f1c1a3cd6428a36699c9d.zip |
fix -xdev behavior in the presence of two or more nested mount points
on the command line, e.g. "find / /boot -xdev".
-rw-r--r-- | findutils/find.c | 6 |
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 | |||
383 | #if ENABLE_FEATURE_FIND_XDEV | 383 | #if ENABLE_FEATURE_FIND_XDEV |
384 | if (S_ISDIR(statbuf->st_mode) && xdev_count) { | 384 | if (S_ISDIR(statbuf->st_mode) && xdev_count) { |
385 | for (i = 0; i < xdev_count; i++) { | 385 | for (i = 0; i < xdev_count; i++) { |
386 | if (xdev_dev[i] != statbuf->st_dev) | 386 | if (xdev_dev[i] == statbuf->st_dev) |
387 | return SKIP; | 387 | break; |
388 | } | 388 | } |
389 | if (i == xdev_count) | ||
390 | return SKIP; | ||
389 | } | 391 | } |
390 | #endif | 392 | #endif |
391 | i = exec_actions(actions, fileName, statbuf); | 393 | i = exec_actions(actions, fileName, statbuf); |