Re: [PATCH v2 07/11] xfsprogs: change nftw64 to nftw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





--- a/estimate/xfs_estimate.c
+++ b/estimate/xfs_estimate.c
@@ -168,7 +168,7 @@ main(int argc, char **argv)
                ndirs=0LL;              /* number of directories */
                nspecial=0LL;           /* number of special files */

-               nftw64(argv[optind], ffn, 40, FTW_PHYS | FTW_MOUNT);
+               nftw(argv[optind], ffn, 40, FTW_PHYS | FTW_MOUNT);

                if (__debug) {
                        printf(_("dirsize=%llu\n"), dirsize);
--
2.4.5

 
​Now I noticed this causes a warning:
xfs_estimate.c:171:3: warning: passing argument 2 of ‘nftw’ from incompatible pointer type

From ftw.h, the difference is in __nftw_func_t and __nftw64_func_t as a second argument. However, what we pass in the code is "
int
​ ​
ffn(
​..., struct stat64 *stb, ...)". ​If I change this to struct stat, it works and xfstests -g quick gives the same result as with 64bit variant. So I'm sending an updated patch.

Cheers,
Jan





--
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs

[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux