aboutsummaryrefslogtreecommitdiff
path: root/gl/fsusage.c
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-18 11:03:36 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-18 11:03:36 +0200
commitf3dbc2ec871da22028969540424a63ff51404cfd (patch)
tree4225e3007008839ec710fcc17ed6cc9bf8db748c /gl/fsusage.c
parent5c8dd483ccc5f4cf2d86c4ae386efb86e3b259cd (diff)
downloadmonitoring-plugins-f3dbc2ec871da22028969540424a63ff51404cfd.tar.gz
Sync with the latest Gnulib code (6f2d632)
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 10db467d..17102aad 100644
--- a/gl/fsusage.c
+++ b/gl/fsusage.c
@@ -94,7 +94,7 @@
int
get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
{
-#if defined STAT_STATVFS /* POSIX */
+#if defined STAT_STATVFS /* POSIX, except glibc/Linux */
struct statvfs fsd;
@@ -156,7 +156,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
: (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1));
fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode);
-#elif defined STAT_STATFS3_OSF1
+#elif defined STAT_STATFS3_OSF1 /* OSF/1 */
struct statfs fsd;
@@ -165,7 +165,9 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
-#elif defined STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
+#elif defined STAT_STATFS2_BSIZE /* glibc/Linux, 4.3BSD, SunOS 4, \
+ MacOS X < 10.4, FreeBSD < 5.0, \
+ NetBSD < 3.0, OpenBSD < 4.4 */
struct statfs fsd;
@@ -189,7 +191,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
}
# endif /* STATFS_TRUNCATES_BLOCK_COUNTS */
-#elif defined STAT_STATFS2_FSIZE /* 4.4BSD */
+#elif defined STAT_STATFS2_FSIZE /* 4.4BSD and older NetBSD */
struct statfs fsd;
@@ -198,7 +200,8 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
-#elif defined STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */
+#elif defined STAT_STATFS4 /* SVR3, Dynix, old Irix, old AIX, \
+ Dolphin */
# if !_AIX && !defined _SEQUENT_ && !defined DOLPHIN
# define f_bavail f_bfree