X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_mount.c;h=b63a81ad29b44fe13c113ca8843a7abb701bcfbf;hb=da658a37ddd9421752903c4ff5f2aa83320387c5;hp=c53431f1a6458e8902b25ff2537f545e536b6269;hpb=4e6812d3e5073e5b4bd7eaef9f2539c8c9dd28a4;p=collectd.git diff --git a/src/utils_mount.c b/src/utils_mount.c index c53431f1..b63a81ad 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -21,20 +21,18 @@ * Niki W. Waibel **/ -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include "collectd.h" +#include "utils_mount.h" + +#include "common.h" /* sstrncpy() et alii */ +#include "plugin.h" /* ERROR() macro */ -#include "common.h" #if HAVE_XFS_XQM_H # include #define XFS_SUPER_MAGIC_STR "XFSB" #define XFS_SUPER_MAGIC2_STR "BSFX" #endif -#include "plugin.h" -#include "utils_mount.h" - #if HAVE_GETVFSSTAT # if HAVE_SYS_TYPES_H # include @@ -659,11 +657,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) @@ -752,9 +750,6 @@ cu_mount_getoptionvalue(char *line, char *keyword) r += strlen(keyword); p = strchr(r, ','); if(p == NULL) { - if(strlen(r) == 0) { - return NULL; - } return sstrdup(r); } else { char *m;