summaryrefslogtreecommitdiff
path: root/lib/fsusage.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-10-29 05:06:43 +0000
committerJim Meyering <jim@meyering.net>1994-10-29 05:06:43 +0000
commit21b82f43b91d9763aee9acb05049af9159e9203e (patch)
tree9232b855dc59a007554bef7ceb3d7faf8a5ebc52 /lib/fsusage.c
parent1fd77b2ddfd44d1150c73f675adca8ca8b483ad1 (diff)
downloadcoreutils-21b82f43b91d9763aee9acb05049af9159e9203e.tar.xz
.
Diffstat (limited to 'lib/fsusage.c')
-rw-r--r--lib/fsusage.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/fsusage.c b/lib/fsusage.c
index e8c1bfca1..e0aec2a88 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -154,7 +154,7 @@ get_fs_usage (path, disk, fsp)
#define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_fsize, 512)
#endif
-#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix. */
+#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX. */
struct statfs fsd;
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
@@ -162,12 +162,16 @@ get_fs_usage (path, disk, fsp)
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
-#define CONVERT_BLOCKS(b) (b)
-#ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx. */
-#ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
-#define f_bavail f_bfree
-#endif
-#endif
+# if _AIX
+# define CONVERT_BLOCKS(b) adjust_blocks ((b), fsd.f_bsize, 512)
+# else
+# define CONVERT_BLOCKS(b) (b)
+# ifndef _SEQUENT_ /* _SEQUENT_ is DYNIX/ptx. */
+# ifndef DOLPHIN /* DOLPHIN 3.8.alfa/7.18 has f_bavail */
+# define f_bavail f_bfree
+# endif
+# endif
+# endif
#endif
#ifdef STAT_STATVFS /* SVR4. */