xfs
[Top] [All Lists]

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

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: Re: [PATCH v2 07/11] xfsprogs: change nftw64 to nftw
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Wed, 9 Sep 2015 12:11:08 +0200
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jan Tulak <jtulak@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1441276784-23701-1-git-send-email-jtulak@xxxxxxxxxx>
References: <1440590555-20463-7-git-send-email-jtulak@xxxxxxxxxx> <1441276784-23701-1-git-send-email-jtulak@xxxxxxxxxx>


--- 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





--
<Prev in Thread] Current Thread [Next in Thread>