summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a212b42)
raw | patch | inline | side by side (parent: a212b42)
author | octo <octo> | |
Sun, 29 Jan 2006 22:14:59 +0000 (22:14 +0000) | ||
committer | octo <octo> | |
Sun, 29 Jan 2006 22:14:59 +0000 (22:14 +0000) |
ChangeLog | patch | blob | history | |
src/df.c | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 0a86b388382247cf829713d79e9f7829bc729fa4..f592a63aa42e5e9cea981dbc1ce7bdbec3d67120 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
to read the old file, but not to read the new one.
* The `hddtemp' plugin can now be configured to connect to another
address and/or port than localhost.
+ * The `df' plugin now prefers `statvfs' over `statfs'.
2006-01-24, Version 3.6.2
* Due to a bug in the configfile handling collectd wouldn't start in
diff --git a/src/df.c b/src/df.c
index 8cc9f2eb440615610ed13ca82eb2500e02a08469..6b7df3112a92b27ecbcaa401eb4663a39ba8f539 100644 (file)
--- a/src/df.c
+++ b/src/df.c
#endif
#if HAVE_STATVFS
+# if HAVE_SYS_STATVFS_H
+# include <sys/statvfs.h>
+# endif
# define STATANYFS statvfs
# define BLOCKSIZE(s) ((s).f_frsize ? (s).f_frsize : (s).f_bsize)
#elif HAVE_STATFS
+# if HAVE_SYS_STATFS_H
+# include <sys/statfs.h>
+# endif
# define STATANYFS statfs
# define BLOCKSIZE(s) (s).f_bsize
#endif
static void df_read (void)
{
- struct STATANYFS statbuf;
+#if HAVE_STATVFS
+ struct statvfs statbuf;
+#elif HAVE_STATFS
+ struct statfs statbuf;
+#endif
+ /* struct STATANYFS statbuf; */
cu_mount_t *mnt_list;
cu_mount_t *mnt_ptr;