From: Rich Felker Date: Sat, 1 Feb 2014 19:33:33 +0000 (-0500) Subject: fix nftw FTW_MOUNT flag X-Git-Tag: v1.0.0~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73871ee3f21b13b88f2f20a39a1d9bc751bcc1df;p=musl fix nftw FTW_MOUNT flag the incorrect check for crossing device boundaries was preventing nftw from traversing anything except the initially provided pathname. --- diff --git a/src/misc/nftw.c b/src/misc/nftw.c index b2e84bca..efb2b895 100644 --- a/src/misc/nftw.c +++ b/src/misc/nftw.c @@ -46,8 +46,7 @@ static int do_nftw(char *path, int (*fn)(const char *, const struct stat *, int, type = FTW_F; } - if ((flags & FTW_MOUNT) && h - && (st.st_dev != h->dev || st.st_ino != h->ino)) + if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev) return 0; new.chain = h;