fix -xdev behavior in the presence of two or more nested mount points
on the command line, e.g. "find / /boot -xdev".
This commit is contained in:
parent
fdf9060aa3
commit
dcf9bba3b7
@ -383,9 +383,11 @@ static int fileAction(const char *fileName, struct stat *statbuf, void *userData
|
|||||||
#if ENABLE_FEATURE_FIND_XDEV
|
#if ENABLE_FEATURE_FIND_XDEV
|
||||||
if (S_ISDIR(statbuf->st_mode) && xdev_count) {
|
if (S_ISDIR(statbuf->st_mode) && xdev_count) {
|
||||||
for (i = 0; i < xdev_count; i++) {
|
for (i = 0; i < xdev_count; i++) {
|
||||||
if (xdev_dev[i] != statbuf->st_dev)
|
if (xdev_dev[i] == statbuf->st_dev)
|
||||||
return SKIP;
|
break;
|
||||||
}
|
}
|
||||||
|
if (i == xdev_count)
|
||||||
|
return SKIP;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
i = exec_actions(actions, fileName, statbuf);
|
i = exec_actions(actions, fileName, statbuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user