xfs
[Top] [All Lists]

[PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs

To: xfs@xxxxxxxxxxx
Subject: [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs
From: Felix Janda <felix.janda@xxxxxxxxx>
Date: Sat, 13 Aug 2016 18:22:27 +0200
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <cover.1471107858.git.felix.janda@xxxxxxxxx>
References: <cover.1471107858.git.felix.janda@xxxxxxxxx>
Resent-date: Sat, 13 Aug 2016 19:24:59 +0200
Resent-from: Felix Janda <felix.janda@xxxxxxxxx>
Resent-message-id: <20160813172459.GJ3858@nyan>
Resent-to: xfs@xxxxxxxxxxx
Signed-off-by: Felix Janda <felix.janda@xxxxxxxxx>
---
 fsr/xfs_fsr.c    | 8 ++++----
 include/darwin.h | 1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 9cffa1b..517b75f 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -89,7 +89,7 @@ static void fsrallfs(char *mtab, int howlong, char 
*leftofffile);
 static void fsrall_cleanup(int timeout);
 static int  getnextents(int);
 int xfsrtextsize(int fd);
-int xfs_getrt(int fd, struct statvfs64 *sfbp);
+int xfs_getrt(int fd, struct statvfs *sfbp);
 char * gettmpname(char *fname);
 char * getparent(char *fname);
 int fsrprintf(const char *fmt, ...);
@@ -888,7 +888,7 @@ fsrfile_common(
        xfs_bstat_t     *statp)
 {
        int             error;
-       struct statvfs64 vfss;
+       struct statvfs  vfss;
        struct fsxattr  fsx;
        unsigned long   bsize;
 
@@ -940,7 +940,7 @@ fsrfile_common(
         * Note that xfs_bstat.bs_blksize returns the filesystem blocksize,
         * not the optimal I/O size as struct stat.
         */
-       if (statvfs64(fsname ? fsname : fname, &vfss) < 0) {
+       if (statvfs(fsname ? fsname : fname, &vfss) < 0) {
                fsrprintf(_("unable to get fs stat on %s: %s\n"),
                        fname, strerror(errno));
                return -1;
@@ -1700,7 +1700,7 @@ xfs_getgeom(int fd, xfs_fsop_geom_v1_t * fsgeom)
  * Get xfs realtime space information
  */
 int
-xfs_getrt(int fd, struct statvfs64 *sfbp)
+xfs_getrt(int fd, struct statvfs *sfbp)
 {
        unsigned long   bsize;
        unsigned long   factor;
diff --git a/include/darwin.h b/include/darwin.h
index fb13915..495b44b 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -216,7 +216,6 @@ static inline int timer_gettime (timer_t timerid, struct 
itimerspec *value)
 #  include <sys/param.h>
 #include <sys/ucred.h>
 #include <errno.h>
-#define statvfs64      statfs
 #define                _PATH_MOUNTED   "/etc/mtab"
 
 struct mntent
-- 
2.7.3

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