summaryrefslogtreecommitdiffstats
path: root/gl/fsusage.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/fsusage.c')
-rw-r--r--gl/fsusage.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gl/fsusage.c b/gl/fsusage.c
index 10db467..17102aa 100644
--- a/gl/fsusage.c
+++ b/gl/fsusage.c
@@ -94,7 +94,7 @@
94int 94int
95get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp) 95get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
96{ 96{
97#if defined STAT_STATVFS /* POSIX */ 97#if defined STAT_STATVFS /* POSIX, except glibc/Linux */
98 98
99 struct statvfs fsd; 99 struct statvfs fsd;
100 100
@@ -156,7 +156,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
156 : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1)); 156 : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1));
157 fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode); 157 fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode);
158 158
159#elif defined STAT_STATFS3_OSF1 159#elif defined STAT_STATFS3_OSF1 /* OSF/1 */
160 160
161 struct statfs fsd; 161 struct statfs fsd;
162 162
@@ -165,7 +165,9 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
165 165
166 fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); 166 fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
167 167
168#elif defined STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ 168#elif defined STAT_STATFS2_BSIZE /* glibc/Linux, 4.3BSD, SunOS 4, \
169 MacOS X < 10.4, FreeBSD < 5.0, \
170 NetBSD < 3.0, OpenBSD < 4.4 */
169 171
170 struct statfs fsd; 172 struct statfs fsd;
171 173
@@ -189,7 +191,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
189 } 191 }
190# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */ 192# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
191 193
192#elif defined STAT_STATFS2_FSIZE /* 4.4BSD */ 194#elif defined STAT_STATFS2_FSIZE /* 4.4BSD and older NetBSD */
193 195
194 struct statfs fsd; 196 struct statfs fsd;
195 197
@@ -198,7 +200,8 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
198 200
199 fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize); 201 fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
200 202
201#elif defined STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ 203#elif defined STAT_STATFS4 /* SVR3, Dynix, old Irix, old AIX, \
204 Dolphin */
202 205
203# if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN 206# if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN
204# define f_bavail f_bfree 207# define f_bavail f_bfree