patch: find -xdev still descends other devs
Rob Landley
rob at landley.net
Sat Mar 25 03:00:03 UTC 2006
On Friday 24 March 2006 4:00 pm, Paul Fox wrote:
> because of the ordering of the code, directories that should
> be skipped due to -xdev are still traversed.
>
> as a bonus, the new code is smaller.
> $ size findutils/find.o.new
> text data bss dec hex filename
> 2384 16 52 2452 994 findutils/find.o
> $ size findutils/find.o.orig
> text data bss dec hex filename
> 2447 16 52 2515 9d3 findutils/find.o
>
>
> i'll commit this unless someone objects.
>
> paul
>
> Index: findutils/find.c
> ===================================================================
> --- findutils/find.c (revision 14650)
> +++ findutils/find.c (working copy)
> @@ -79,6 +79,15 @@
>
> static int fileAction(const char *fileName, struct stat *statbuf, void*
> junk) {
> +#ifdef CONFIG_FEATURE_FIND_XDEV
> + if (S_ISDIR(statbuf->st_mode) && xdev_count) {
This app should someday be fixed so we can easily go:
if (ENABLE_FEATURE_FIND_XDEV && S_ISDIR(statbuf->st_mode) && xdev_count) {
But for now, sure...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list