[PATCH v2 07/11] xfsprogs: change nftw64 to nftw
Jan Tulak
jtulak at redhat.com
Wed Sep 9 05:11:08 CDT 2015
>
> --- 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
--
Jan Tulak
jtulak at redhat.com / jan at tulak.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20150909/83136f49/attachment.html>
More information about the xfs
mailing list