From: Florian Forster Date: Wed, 6 May 2009 14:37:18 +0000 (+0200) Subject: Merge branch 'collectd-4.5' into collectd-4.6 X-Git-Tag: collectd-4.7.0~13^2~1 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=a940e2555464956ae7b61d8d0d742f2acc001c5f;hp=a1ae4b5afaf3207a7070b85f802b41b32c0b9a20;p=collectd.git Merge branch 'collectd-4.5' into collectd-4.6 Conflicts: src/Makefile.am --- diff --git a/configure.in b/configure.in index b4d1d943..bed13f8e 100644 --- a/configure.in +++ b/configure.in @@ -799,7 +799,6 @@ if test "x$have_getmntent" = "xc"; then [c_cv_have_one_getmntent], AC_COMPILE_IFELSE( AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT -#include #include "$srcdir/src/utils_mount.h"]], [[ FILE *fh; @@ -816,7 +815,6 @@ if test "x$have_getmntent" = "xc"; then [c_cv_have_two_getmntent], AC_COMPILE_IFELSE( AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT -#include #include "$srcdir/src/utils_mount.h"]], [[ FILE *fh; @@ -2993,14 +2991,40 @@ then plugin_tcpconns="yes" fi -if test "x$have_statfs" = "xyes" +# Df plugin: Check if we know how to determine mount points first. +#if test "x$have_listmntent" = "xyes"; then +# plugin_df="yes" +#fi +if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes" then plugin_df="yes" fi -if test "x$have_statvfs" = "xyes" +if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun" then plugin_df="yes" fi +#if test "x$have_getmntent" = "xseq" +#then +# plugin_df="yes" +#fi +if test "x$c_cv_have_one_getmntent" = "xyes" +then + plugin_df="yes" +fi + +# Df plugin: Check if we have either `statfs' or `statvfs' second. +if test "x$plugin_df" = "xyes" +then + plugin_df="no" + if test "x$have_statfs" = "xyes" + then + plugin_df="yes" + fi + if test "x$have_statvfs" = "xyes" + then + plugin_df="yes" + fi +fi if test "x$have_getifaddrs" = "xyes" then diff --git a/src/Makefile.am b/src/Makefile.am index f81fbbde..39027951 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -40,7 +40,6 @@ collectd_SOURCES = collectd.c collectd.h \ utils_parse_option.c utils_parse_option.h \ utils_tail_match.c utils_tail_match.h \ utils_match.c utils_match.h \ - utils_mount.c utils_mount.h \ utils_subst.c utils_subst.h \ utils_tail.c utils_tail.h \ utils_threshold.c utils_threshold.h \ @@ -228,7 +227,7 @@ endif if BUILD_PLUGIN_DF pkglib_LTLIBRARIES += df.la -df_la_SOURCES = df.c +df_la_SOURCES = df.c utils_mount.c utils_mount.h df_la_LDFLAGS = -module -avoid-version collectd_LDADD += "-dlopen" df.la collectd_DEPENDENCIES += df.la diff --git a/src/utils_mount.c b/src/utils_mount.c index c53431f1..cae37067 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -659,11 +659,11 @@ cu_mount_t *cu_mount_getlist(cu_mount_t **list) #elif HAVE_TWO_GETMNTENT || HAVE_GEN_GETMNTENT || HAVE_SUN_GETMNTENT new = cu_mount_gen_getmntent (); #elif HAVE_SEQ_GETMNTENT -# warn "This version of `getmntent' hat not yet been implemented!" +# error "This version of `getmntent' hat not yet been implemented!" #elif HAVE_ONE_GETMNTENT new = cu_mount_getmntent (); #else - new = NULL; +# error "Could not determine how to find mountpoints." #endif if (first != NULL) diff --git a/src/utils_mount.h b/src/utils_mount.h index cab5c01e..1f2403c3 100644 --- a/src/utils_mount.h +++ b/src/utils_mount.h @@ -23,11 +23,9 @@ /* See below for instructions how to use the public functions. */ -#if !COLLECTD_UTILS_MOUNT_H +#ifndef COLLECTD_UTILS_MOUNT_H #define COLLECTD_UTILS_MOUNT_H 1 -#include "common.h" - #if HAVE_FS_INFO_H # include #endif