xfs
[Top] [All Lists]

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

To: xfs@xxxxxxxxxxx
Subject: [PATCH v3 07/11] xfsprogs: change nftw64 to nftw
From: Jan Tulak <jtulak@xxxxxxxxxx>
Date: Wed, 9 Sep 2015 12:14:16 +0200
Cc: hch@xxxxxxxxxxxxx, Jan Tulak <jtulak@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1441276784-23701-1-git-send-email-jtulak@xxxxxxxxxx>
References: <1441276784-23701-1-git-send-email-jtulak@xxxxxxxxxx>
Changelog:
 - changed ffn argument from stat64 to stat
 - Subject was "add nftw64 translation for OS X"
 - Changed from #define to renaming

There is only one usage of nftw64 in entire xfsprogs, but
multiple usages of nftw. It seems the 64 variant has no reason,
and causes difficulties with some other platforms which has
only nftw call.

Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx>
---
 estimate/xfs_estimate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/estimate/xfs_estimate.c b/estimate/xfs_estimate.c
index 65b7168..323137c 100644
--- a/estimate/xfs_estimate.c
+++ b/estimate/xfs_estimate.c
@@ -45,7 +45,7 @@ cvtnum(char *s)
        return 0LL;
 }
 
-int ffn(const char *, const struct stat64 *, int, struct FTW *);
+int ffn(const char *, const struct stat *, int, struct FTW *);
 
 #define BLOCKSIZE      4096
 #define INODESIZE      256
@@ -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);
@@ -214,7 +214,7 @@ main(int argc, char **argv)
 }
 
 int
-ffn(const char *path, const struct stat64 *stb, int flags, struct FTW *f)
+ffn(const char *path, const struct stat *stb, int flags, struct FTW *f)
 {
        /* cases are in most-encountered to least-encountered order */
        dirsize+=PERDIRENTRY+strlen(path);
-- 
2.4.5

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